From 8a90a4b73ddc1709dd6b6ee5799cce4d57b66a8e Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 27 Jul 1998 08:11:21 +0000 Subject: Mon Jul 27 17:46:37 1998 Ross Johnson * create.c (pthread_create): Start of rewrite. Not completed yet. * private.c (_pthread_new_thread_entry): Start of rewrite. Not complete. * implement.h (_pthread_threads_thread): Rename, remove thread member, add win32handle and ptstatus members. (_pthread_t): Add. * pthread.h: pthread_t is no longer mapped directly to a Win32 HANDLE type. This is so we can let the Win32 thread terminate and reuse the HANDLE while pthreads holds it's own thread ID until the last waiting join exits. --- create.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'create.c') diff --git a/create.c b/create.c index dc54c37..61c5aff 100644 --- a/create.c +++ b/create.c @@ -19,20 +19,20 @@ _pthread_start_call(void * us_arg) /* We're now in a running thread. Any local variables here are on this threads private stack so we're safe to leave data in them until we leave. */ - _pthread_threads_thread__t * us; + pthread_t us; _pthread_call_t * call; unsigned (*func)(void *); void * arg; unsigned ret; int from; - us = (_pthread_threads_thread__t *) us_arg; + us = (pthread_t) us_arg; /* FIXME: For now, if priority setting fails then at least ensure that our records reflect true reality. */ - if (SetThreadPriority((HANDLE) us->thread, us->attr.priority) == FALSE) + if (SetThreadPriority((HANDLE) us->win32handle, us->attr.priority) == FALSE) { - us->attr.priority = GetThreadPriority((HANDLE) us->thread); + us->attr.priority = GetThreadPriority((HANDLE) us->win32handle; } func = us->call.routine; @@ -56,14 +56,14 @@ pthread_create(pthread_t *thread, void * security = NULL; DWORD threadID; pthread_attr_t * attr_copy; - _pthread_threads_thread_t * us; + pthread_t * usptr; /* Success unless otherwise set. */ int ret; /* CRITICAL SECTION */ pthread_mutex_lock(&_pthread_table_mutex); - ret = _pthread_new_thread_entry((pthread_t) handle, us); + ret = _pthread_new_thread_entry((pthread_t) handle, usptr); pthread_mutex_lock(&_pthread_table_mutex); /* END CRITICAL SECTION */ -- cgit v1.2.3