diff options
author | rpj <rpj> | 1998-07-27 08:11:21 +0000 |
---|---|---|
committer | rpj <rpj> | 1998-07-27 08:11:21 +0000 |
commit | 8a90a4b73ddc1709dd6b6ee5799cce4d57b66a8e (patch) | |
tree | c95d5557876242864f99e8fe8715cf042a6c402d /create.c | |
parent | 537fe68bc5ca2dd75f4f54146a50a39c5b55b8e3 (diff) |
Mon Jul 27 17:46:37 1998 Ross Johnson <rpj@swan.canberra.edu.au>
* 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.
Diffstat (limited to 'create.c')
-rw-r--r-- | create.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 */ |