summaryrefslogtreecommitdiff
path: root/private.c
diff options
context:
space:
mode:
authorrpj <rpj>1998-07-27 08:11:21 +0000
committerrpj <rpj>1998-07-27 08:11:21 +0000
commit8a90a4b73ddc1709dd6b6ee5799cce4d57b66a8e (patch)
treec95d5557876242864f99e8fe8715cf042a6c402d /private.c
parent537fe68bc5ca2dd75f4f54146a50a39c5b55b8e3 (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 'private.c')
-rw-r--r--private.c7
1 files changed, 4 insertions, 3 deletions
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)
{