commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hurd/libpthread sysdeps/mach/hurd/pt-sysdep.h s...


From: Neal H. Walfield
Subject: hurd/libpthread sysdeps/mach/hurd/pt-sysdep.h s...
Date: Sat, 16 Aug 2008 13:13:07 +0000

CVSROOT:        /sources/hurd
Module name:    hurd
Changes by:     Neal H. Walfield <neal> 08/08/16 13:13:07

Modified files:
        libpthread/sysdeps/mach/hurd: pt-sysdep.h 
        libpthread/sysdeps/mach: pt-thread-halt.c pt-thread-alloc.c 
        libpthread/pthread: pt-join.c pt-internal.h pt-exit.c 
                            pt-detach.c pt-dealloc.c pt-create.c 
                            pt-alloc.c 
        libpthread     : ChangeLog 

Log message:
        2008-08-16  Neal H. Walfield  <address@hidden>
        
                * pthread/pt-alloc.c: Don't include <bits/atomic.h>.
                (__pthread_free_threads): Change to a struct __pthread *.
                (__pthread_free_threads_lock): New variable.
                (__pthread_alloc): When looking for a TCB to reuse, iterate over
                __pthread_free_threads taking the first for which the STATE 
field
                is PTHREAD_TERMINATED.  When reusing a TCB, first call
                __pthread_thread_halt on it.
                * pthread/pt-dealloc.c: Don't include <bits/atomic.h>.
                (__pthread_free_threads): Change to a struct __pthread *.
                (__pthread_free_threads_lock): New declaration.
                (__pthread_dealloc): Enqueue PTHREAD on __PTHREAD_FREE_THREADS.
                Set PTHREAD->STATE to PTHREAD_TERMINATED after everything else.
                * pthread/pt-join.c (pthread_join): Call __pthread_thread_halt
                before destroying the thread.  When destroying the thread, call
                __pthread_thread_dealloc on it.
                * pthread/pt-detach.c (pthread_detach): If destroying the 
thread,
                call __pthread_thread_halt before deallocating the stack.  In 
this
                case, also call __pthread_thread_dealloc on the tcb.
                * pthread/pt-exit.c (pthread_exit): Call __pthread_dealloc only 
if
                the thread is detached and then as the last thing we do before
                calling __pthread_thread_halt.
                * pthread/pt-internal.h (__pthread_thread_halt): Remove argument
                NEED_DEALLOC.  Update users.
                * sysdeps/mach/pt-thread-halt.c (__pthread_thread_halt): Remove
                argument need_dealloc.
                * sysdeps/mach/hurd/pt-sysdep.h (PTHREAD_SYSDEP_MEMBERS): Add 
field
                have_kernel_resources.
                * sysdeps/mach/hurd/pt-thread-alloc.c (__pthread_thread_alloc): 
If
                THREAD->HAVE_KERNEL_RESOURCES is true, just return.  After
                allocating the resources, set THREAD->HAVE_KERNEL_RESOURCES to
                true.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/hurd/libpthread/sysdeps/mach/hurd/pt-sysdep.h?cvsroot=hurd&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/hurd/libpthread/sysdeps/mach/pt-thread-halt.c?cvsroot=hurd&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/hurd/libpthread/sysdeps/mach/pt-thread-alloc.c?cvsroot=hurd&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/hurd/libpthread/pthread/pt-join.c?cvsroot=hurd&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/hurd/libpthread/pthread/pt-internal.h?cvsroot=hurd&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/hurd/libpthread/pthread/pt-exit.c?cvsroot=hurd&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/hurd/libpthread/pthread/pt-detach.c?cvsroot=hurd&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/hurd/libpthread/pthread/pt-dealloc.c?cvsroot=hurd&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/hurd/libpthread/pthread/pt-create.c?cvsroot=hurd&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/hurd/libpthread/pthread/pt-alloc.c?cvsroot=hurd&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/hurd/libpthread/ChangeLog?cvsroot=hurd&r1=1.47&r2=1.48




reply via email to

[Prev in Thread] Current Thread [Next in Thread]