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. --- private.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'private.c') diff --git a/private.c b/private.c index 8424277..44afd4f 100644 --- a/private.c +++ b/private.c @@ -23,16 +23,17 @@ */ int -_pthread_new_thread_entry(pthread_t thread, _pthread_threads_thread_t * entry) +_pthread_new_thread_entry(_pthread_t * entry) { - _pthread_threads_thread_t * new; + _pthread_t new; if (_pthread_threads_count >= PTHREAD_THREADS_MAX) { return EAGAIN; } - new = &_pthread_threads_table[_PTHREAD_HASH_INDEX(thread)]; + /* Use a preloaded reuse stack of pthread_t. */ + new = while (new->thread != NULL) { -- cgit v1.2.3