summaryrefslogtreecommitdiff
path: root/libpthread
AgeCommit message (Collapse)Author
2008-01-23libpthread/neal
2008-01-23 Neal H. Walfield <neal@gnu.org> * Makefile.am (AM_CPPFLAGS): Add -I$(LIBC)/include. libhurd-slab/ 2008-01-23 Neal H. Walfield <neal@gnu.org> * Makefile.am (AM_CPPFLAGS): Add -I$(LIBC)/include. libhurd-mm/ 2008-01-23 Neal H. Walfield <neal@gnu.org> * Makefile.am (COMMON_CPPFLAGS): Add -I$(LIBC)/include. libhurd-ihash/ 2008-01-23 Neal H. Walfield <neal@gnu.org> * Makefile.am (AM_CPPFLAGS): Add -I$(LIBC)/include. ruth/ 2008-01-23 Neal H. Walfield <neal@gnu.org> * Makefile.am (COMMON_CPPFLAGS): Add -I$(LIBC)/include. (ruth_SOURCES): Remove malloc-wrap.c, output.h and output.c. (ruth_LDADD): Set to $(top_builddir)/libc.a. * panic.c: Don't include "output.h". Include <stdio.h>. * ruth.h: Likewise. * ruth.c (getpagesize): Return a size_t, not an int.
2008-01-172008-01-17 Neal H. Walfield <neal@gnu.org>neal
* sysdeps/l4/hurd/pt-block.c: New file. * sysdeps/l4/hurd/pt-wakeup.c: Likewise.
2008-01-012008-01-01 Neal H. Walfield <neal@gnu.org>neal
* sysdeps/generic/pt-mutex-timedlock.c (__pthread_mutex_timedlock_internal): Add additional asserts. [! NDEBUG]: Keep MUTEX->OWNER up to date. * sysdeps/generic/pt-mutex-trylock.c (__pthread_mutex_trylock): Add additional asserts. [! NDEBUG]: Keep MUTEX->OWNER up to date. * sysdeps/generic/pt-mutex-unlock.c (__pthread_mutex_unlock): Add additional asserts. [! NDEBUG]: Keep MUTEX->OWNER up to date.
2007-12-232007-12-23 Neal H. Walfield <neal@gnu.org>neal
* Makefile.am (AM_CPPFLAGS): Add "-std=gnu99 -Wall -g -O3". * sysdeps/l4/pt-block.c (__pthread_block): Remove unused variable err. * pthread/pt-join.c (pthread_join): Cast argument to pthread_cleanup_push to avoid warning.
2007-12-12hurd/neal
2007-12-13 Neal H. Walfield <neal@gnu.org> * exceptions.h (exception_page_cleanup): New declaration. libhurd-mm/ 2007-12-13 Neal H. Walfield <neal@gnu.org> * exceptions.c (exception_frame_alloc): When allocating the first frame, set EXCEPTION_PAGE->EXCEPTION_STACK_BOTTOM. (exception_page_cleanup): New function. * ia32-exception-entry.S (_exception_handler_end): Correctly adjust the exception page's exception stack. libpthread/ 2007-12-13 Neal H. Walfield <neal@gnu.org> * sysdeps/l4/hurd/pt-thread-halt.c: Include <hurd/exceptions.h>. (__pthread_thread_halt): Call exception_page_cleanup.
2007-12-122007-12-12 Neal H. Walfield <neal@gnu.org>neal
* sysdeps/l4/pt-block.c (__pthread_block): Clear the acceptor. Improve debugging output. * sysdeps/l4/pt-wakeup.c (__pthread_wakeup): Load an empty message. Improve debugging output.
2007-12-04viengoos/neal
2007-12-04 Neal H. Walfield <neal@gnu.org> Remove exception threads. Replace with support for activations. * thread.h (THREAD_SLOTS): Bump to 3. (struct thread): Add field exception_page. Remove fields have_exception and exception. (thread_exregs): Take additional arguments exception_page and exception_page_out. Update users. (thread_raise_exception): New declaration. * thread.c (THREAD_VERSION): Define. (thread_init): Remove code related to the exception thread. (thread_commission): Likewise. (thread_decommission): Likewise. (thread_exregs): Likewise. Take additional arguments EXCEPTION_PAGE and EXCEPTION_PAGE_OUT. If CONTROL contains HURD_EXREGS_GET_REGS and EXCEPTION_PAGE_OUT is not NULL, return a capability to THREAD's exception page in *EXCEPTION_PAGE_OUT. If CONTROL contains HURD_EXREGS_SET_EXCEPTION_PAGE, then set THREAD's exception page to EXCEPTION_PAGE. (thread_raise_exception): New function. * server.c (server_loop): Remove code related to handling the exception thread. Call thread_raise_exception to propagate exception. Reimplement the exception_collect method. Update implementation of the thread_exregs method to support the new argument passing scheme. Add support for setting and retrieving the exception page. (REPLYW): Only clear MSG here. * rm.h (exception_collect): Take an additional argument, the principal. * object.h (object_type): New function. hurd/ 2007-12-04 Neal H. Walfield <neal@gnu.org> Remove exception threads. Replace with support for activations. * thread.h: Include <l4/ipc.h>. (struct exception_page): New structure. (THREAD_EXCEPTION_PAGE_SLOT): Define. (HURD_EXREGS_EXCEPTION_THREAD): Don't define. (HURD_EXREGS_SET_EXCEPTION_PAGE): Define. (HURD_EXREGS_SET_REGS): Update. (hurd_exception_handler_t): New definition. (struct hurd_thread_exregs_in): New structure. (struct hurd_thread_exregs_out): New structure. (thread_exregs): Replace the bulk of the arguments with struct hurd_thread_exregs_in and struct hurd_thread_exregs_out. Update users. * exceptions.h (HURD_THREAD_MAIN_VERSION): Remove macro. (HURD_THREAD_EXCEPTION_VERSION): Likewise. (hurd_thread_is_exception_thread): Remove function. (hurd_thread_is_main_thread): Likewise. (hurd_exception_thread): Likewise. (hurd_main_thread): Likewise. (exception_handler_loop): Remove declaration. (exception_handler): New declaration. (exception_handler_entry): Likewise. (exception_handler_end): Likewise. libhurd-mm/ 2007-12-04 Neal H. Walfield <neal@gnu.org> Remove exception threads. Replace with support for activations. * Makefile.am (ARCH_SOURCES): New variable. [ARCH_IA32]: Add ia32-exception-entry.S. (libhurd_mm_a_SOURCES): Add $(ARCH_SOURCES). * ia32-exception-entry.S: New file. * exceptions.c: Include <hurd/storage.h> and <hurd/thread.h>. (ARG): Don't define. (ARG64): Likewise. (ARG_ADDR): Likewise. (CHECK): Likewise. (exception_handler_loop): Remove function. (exception_fetch_exception): New function. (exception_handler): New function. (STACK_SIZE): Don't define. (stack): Don't declare. (exception_handler_init): Set up the thread's exception page. libpthread/ 2007-12-04 Neal H. Walfield <neal@gnu.org> Remove exception threads. Replace with support for activations. * sysdeps/l4/hurd/pt-sysdep.h (PTHREAD_SYSDEP_MEMBERS): Remove fields exception_handler_stack and exception_handler_sp. Add field exception_page. * sysdeps/l4/hurd/pt-thread-alloc.c (__pthread_thread_alloc): Allocate a page for THREAD->EXCEPTION_PAGE, not THREAD->EXCEPTION_HANDLER_STACK. * sysdeps/l4/hurd/ia32/pt-setup.c: Include <hurd/thread.h> and <hurd/exceptions.h>. (__pthread_setup): Remove code dealing with the exception thread. Set up the exception page. * sysdeps/l4/hurd/pt-thread-start.c (__pthread_thread_start): Remove code dealing with the exception thread. Update to use new rm_thread_exregs interface. Also set the thread's exception page. * sysdeps/l4/hurd/pt-thread-halt.c (__pthread_thread_halt): Remove code to dealing with the exception thread. Free the THREAD->EXCEPTION_PAGE. ruth/ 2007-12-04 Neal H. Walfield <neal@gnu.org> * ruth.c (main): Update to use new rm_thread_exregs interface.
2007-11-232007-11-23 Neal H. Walfield <neal@gnu.org>neal
* pthread/pt-internal.h (__pthread_startup): Add declaration. * pthread/pt-create.c (entry_point): Call __pthread_startup. * sysdeps/l4/hurd/pt-sysdep.h: Include <hurd/storage.h> and <sys/mman.h>. (PTHREAD_SYSDEP_MEMBERS): Add fields object, exception_handler_stack and exception_handler_sp. (__attribute__): Call munmap. * sysdeps/l4/hurd/ia32/pt-setup.c (__pthread_setup): Set up thread->exception_handler_sp. Don't set the user define handle here. * sysdeps/l4/hurd/pt-startup.c: New file. Do it here. * sysdeps/l4/hurd/pt-thread-alloc.c: New file. * sysdeps/l4/hurd/pt-thread-halt.c: New file. * sysdeps/l4/hurd/pt-thread-start.c: New file. * Makefile.am (libpthread_a_SOURCES): Add pt-startup.c. * sysdeps/l4/pt-block.c: Include <hurd/stddef.h>. (__pthread_block): Detect IPC failure. Add debugging output. * sysdeps/l4/pt-wakeup.c: Include <hurd/stddef.h>. (__pthread_wakeup): Detect IPC failure. Add debugging output.
2007-11-202007-11-20 Neal H. Walfield <neal@gnu.org>neal
* sysdeps/l4/pt-thread-dealloc.c: New file. * Makefile.am (libpthread_a_SOURCES): Add pt-thread-dealloc.c. * sysdeps/l4/hurd/pt-sysdep.h (PTHREAD_STACK_DEFAULT): Change to 2MB. * sysdeps/l4/hurd/pt-sysdep.c (sched_yield): New function. (sigprocmask): Likewise. (init_routine): Only call __pthread_initialize once. Update comments.
2007-11-202007-11-20 Neal H. Walfield <neal@gnu.org>neal
* Makefile.am (libpthread_a_SOURCES): Remove pt-create-np.c. * sysdeps/l4/pt-create-np.c: Remove file. * sysdeps/l4/pt-pool-np.c (pthread_pool_add_np): Change tid from an _L4_thread_id_t to an l4_thread_id_t. (pthread_pool_get_np): Return an l4_thread_id_t, not a _L4_thread_id_t. * sysdeps/l4/bits/pthread-np.h (pthread_create_from_l4_tid_np): Remove declaration. (pthread_pool_add_np): Change tid from an _L4_thread_id_t to an l4_thread_id_t. (pthread_pool_get_np): Return an l4_thread_id_t, not a _L4_thread_id_t. * sysdeps/l4/pt-docancel.c (__pthread_do_cancel): Implement for the case that the target thread is not the executing thread. * sysdeps/l4/pt-thread-alloc.c (__pthread_thread_alloc): Return EAGAIN if pthread_pool_get_np does not return a thread. Update comments. * sysdeps/l4/pt-thread-start.c (__pthread_thread_start): Don't set the thread's pager. Assert that if this is the first thread, then THREAD->THREADID is designates the running thread. * sysdeps/l4/pt-timedblock.c (__pthread_timedblock): Add warning about incomplete implementation. * Makefile.am (libpthread_a_SOURCES): Remove pt-thread-init.c. * sysdeps/l4/pt-thread-init.c: Remove dead file. * sysdeps/l4/pt-start.c: Remove dead file.
2007-11-202007-11-20 Neal H. Walfield <neal@gnu.org>neal
Also merge semaphore changes from mainline Hurd.
2007-11-202007-11-20 Neal H. Walfield <neal@gnu.org>neal
Merge changes from mainline Hurd. Update L4 bits to compile with those changes. * sysdeps/l4/pt-block.c (__pthread_block): Call l4_receive, not L4_Receive. * sysdeps/l4/pt-create-np.c (pthread_create_from_l4_tid_np): Don't pass TID to __pthread_create_internal. Emit a warning. * sysdeps/l4/pt-stack-alloc.c (allocate_page): Remove function. (__pthread_stack_alloc): Don't require that STACKSIZE is equal to __pthread_stacksize. Call mmap. * sysdeps/l4/pt-thread-halt.c (__pthread_thread_halt): Take additional argument, need_dealloc. Call __pthread_dealloc. Stop the thread. * sysdeps/l4/hurd/pt-sysdep.c (init_routine): When calling __pthread_create_internal, don't pass the tid. * tests/test-1.c (main): Use pthread_mutex_init, not PTHREAD_MUTEX_INITIALIZER. * pthread/pt-alloc.c: Don't include <bits/atomic.h>. Include <atomic.h>. (__pthread_free_threads): Make it an atomicptr_t, not an __atomicptr_t. (__pthread_alloc): Don't use __atomicptr_compare_and_swap, use atomic_compare_and_exchange_val_acq. * pthread/pt-create.c: Don't include <bits/atomic.h>. Include <atomic.h>. (__pthread_total): Make it an atomic_fast32_t, not an __atomic_t. (__pthread_create_internal): Use atomic_increment and atomic_decrement, not __atomic_inc and __atomic_dec. * pthread/pt-dealloc.c: Don't include <bits/atomic.h>. Include <atomic.h>. (__pthread_free_threads): Make it an atomicptr_t, not an __atomicptr_t. (__pthread_dealloc): Use atomic_compare_and_exchange_val_acq, not __atomicptr_compare_and_swap. * pthread/pt-exit.c: Don't include <bits/atomic.h>. Include <atomic.h>. (pthread_exit): Use atomic_decrement_and_test, not __atomic_dec_and_test. * pthread/pt-internal.h: Don't include <bits/atomic.h>. Include <atomic.h>. (__pthread_total): Make it an atomic_fast32_t, not an __atomic_t. * sysdeps/powerpc/bits/atomic.h: Remove file. * sysdeps/ia32/bits/atomic.h: Likewise.
2007-08-062007-08-06 Neal H. Walfield <neal@gnu.org>neal
* sysdeps/l4/bits/pthread-np.h (pthread_create_from_l4_tid_np): Don't require the GNU interface: use _L4_thread_id_t, not l4_thread_id_t. (pthread_pool_add_np): Likewise. (pthread_pool_get_np): Likewise. * sysdeps/l4/pt-create-np.c (pthread_create_from_l4_tid_np): Likewise. * sysdeps/l4/pt-pool-np.c (pool_list): Likewise. (pthread_pool_add_np): Likewise. (pthread_pool_get_np): Likewise.
2005-02-08libpthread/neal
2005-02-08 Neal H. Walfield <neal@gnu.org> * sysdeps/posix/pt-spin.c (__pthread_spin_lock): Make a weak alias to _pthread_spin_lock. * sysdeps/l4/hurd/pt-sysdep.h (_pthread_self): Add __always_inline__ attribute. (__pthread_stack_dealloc): Likewise.
2005-01-12libc-parts/neal
2005-01-12 Neal H. Walfield <neal@gnu.org> * assert.h: Include prototype for printf. (assert) [!NDEBUG]: Rewrite to do something useful. libhurd-cap-server/ 2005-01-12 Neal H. Walfield <neal@gnu.org> * class-init.c (hurd_cap_class_init_untyped): Fix assert. * bucket-manage-mt.c (manage_mt_worker): Likewise. libpthread/ 2005-01-12 Neal H. Walfield <neal@gnu.org> * sysdeps/l4/pt-thread-alloc.c: Replace assert with a compile time warning. * sysdeps/l4/hurd/pt-sigstate.c (__pthread_sigstate): Don't return EINVAL. Pretend to work so the generic code is happy.
2004-11-022004-11-02 Marcus Brinkmann <marcus@gnu.org>marcus
* sysdeps/generic/bits/condition.h (__PTHREAD_COND_INITIALIZER): Remove compound statement. * pthread/pt-alloc.c (initialize_pthread): Use compound statement. * sysdeps/generic/pt-cond-init.c (pthread_cond_init): Likewise.
2004-11-012004-11-01 Marcus Brinkmann <marcus@gnu.org>marcus
* pthread/pt-create.c (__pthread_total): Change type to uatomic32_t. * pthread/pt-internal.h (__pthread_total): Likewise in declaration.
2004-11-012004-11-01 Marcus Brinkmann <marcus@gnu.org>marcus
* pthread/pt-internal.h: Include <atomic.h>, not <bits/atomic.h>. (__pthread_total): Change type of declaration to uatomic_max_t. * pthread/pt-alloc.c: Include <atomic.h>, not <bits/atomic.h>. (__pthread_free_threads): Change type to uatomicptr_t. (__pthread_alloc): Call atomic_compare_and_exchange_val_acq instead of __atomicptr_compare_and_swap. * pthread/pt-create.c: Include <atomic.h>, not <bits/atomic.h>. (__pthread_total): Change type to uatomic_max_t. (__pthread_create_internal): Call atomic_increment, not __atomic_inc and atomic_decrement, not __atomic_dec. * pthread/pt-dealloc.c: Include <atomic.h>, not <bits/atomic.h>. (__pthread_free_threads): Declare as uatomicptr_t. (__pthread_dealloc): Call atomic_compare_and_exchange_val_acq instead of __atomicptr_compare_and_swap. * pthread/pt-exit.c: Include <atomic.h>, not <bits/atomic.h>. (pthread_exit): Call atomic_decrement_and_test instead of __atomic_dec_and_test. * sysdeps/l4/pt-create-np.c: Do not include <bits/atomic.h>.
2004-11-01Remove spurious file.marcus
2004-10-292004-10-29 Marcus Brinkmann <marcus@gnu.org>marcus
* platform: New directory. * configure.ac (AC_CONFIG_FILES): Add platform/alpha/Makefile, platform/amd64/Makefile, platform/ia32/Makefile, platform/ia64/Makefile, platform/powerpc/Makefile, platform/powerpc64/Makefile and platform/Makefile. * Makefile.am (SUBDIRS): Add platform. libpthread/ 2004-10-29 Marcus Brinkmann <marcus@gnu.org> * headers.am (AC_CONFIG_LINKS): Remove include/bits/atomic.h. platform/ 2004-10-29 Marcus Brinkmann <marcus@gnu.org> * Initial commit.
2004-03-232004-03-23 Marcus Brinkmann <marcus@gnu.org>marcus
* sysdeps/generic/bits/mutex.h (__PTHREAD_MUTEX_INITIALIZER): Remove compound statement. (pthread_mutex_init): Use compound statement with initializer. * pthread/pt-alloc.c (initialize_pthread): Likewise. * sysdeps/generic/pt-mutex-init.c (_pthread_mutex_init): Likewise.
2004-03-19Fix last change.marcus
2004-03-192004-03-19 Marcus Brinkmann <marcus@gnu.org>marcus
* sysdeps/l4/bits/pthread-np.h (pthread_pool_add_np, pthread_pool_get_np): New prototypes. * sysdeps/l4/pt-pool-np.c: New file. * Makefile.am (libpthread_a_SOURCES): Add pt-pool-np.c. * sysdeps/l4/pt-thread-alloc.c (__pthread_thread_alloc): Try to allocate thread from pool. * sysdeps/l4/pt-thread-halt.c (__pthread_thread_halt): Add thread to pool after stopping it.
2004-03-18Fix copyright year.marcus
2004-03-182004-03-17 Marcus Brinkmann <marcus@gnu.org>marcus
* sysdeps/l4/pt-thread-start.c (__pthread_thread_start): Use L4 convenience interface.
2004-03-182004-03-17 Marcus Brinkmann <marcus@gnu.org>marcus
* sysdeps/l4/pt-spin.c (_pthread_spin_lock): Implement using new time period interface.
2004-03-182004-03-17 Marcus Brinkmann <marcus@gnu.org>marcus
* libpthread: New directory, populated with Neal H. Walfields pthread implementation.