Age | Commit message (Collapse) | Author |
|
2009-01-18 Neal H. Walfield <neal@gnu.org>
* sysdeps/viengoos/pt-spin.c (_pthread_spin_lock): Don't use a '
in the #warning.
|
|
2009-01-17 Neal H. Walfield <neal@gnu.org>
* sysdeps/viengoos/pt-docancel.c (__pthread_do_cancel): Use
hurd_myself, not l4_myself.
[! USE_L4]: Abort.
* sysdeps/viengoos/pt-wakeup.c (__pthread_wakeup) [! USE_L4]:
Don't call l4_thread_switch.
|
|
2009-01-17 Neal H. Walfield <neal@gnu.org>
* signal/kill.c: Include <string.h>.
* sysdeps/viengoos/pt-sigstate-init.c: Likewise.
|
|
/
2009-01-16 Neal H. Walfield <neal@gnu.org>
* Makefile.am (L4_SUBDIRS): New variable. Set to l4 directories
if USE_L4 is true, otherwise leave empty.
(SUBDIRS): Remove libl4 and laden. Replace with $(USE_L4).
Rearrange order.
benchmarks/
2009-01-16 Neal H. Walfield <neal@gnu.org>
* activity-distribution.c (main): Use vg_thread_id_t and
hurd_myself, not l4_thread_id_t and l4_myself.
[USE_L4]: Only l4_sleep in this case.
* cache.c (helper_fork): Use hurd_myself, not l4_myself.
(main) [USE_L4]: Only call _L4_kdb in this case.
* shared-memory-distribution.c (main): Use vg_thread_id_t and
hurd_myself, not l4_thread_id_t and l4_myself.
hieronymus/
2009-01-16 Neal H. Walfield <neal@gnu.org>
* hieronymus.c (main): Use uint64_t, not l4_uint64_t.
(main) [USE_L4]: Don't sleep in this case.
hurd/
2009-01-16 Neal H. Walfield <neal@gnu.org>
* lock.h (ss_mutex_trace_add) [! USE_L4]: Set SS_LOCK_TRACE[I].TID
to zero.
* thread.h (hurd_myself) [USE_L4]: Return l4_myself.
* trace.h (trace_buffer_add) [! USE_L4 && ! RM_INTERN]: Use
hurd_myself, not l4_myself.
[! USE_L4 && RM_INTERN]: Don't print a tid.
libc-parts/
2009-01-16 Neal H. Walfield <neal@gnu.org>
* _exit.c (_exit): Use sched_yield, not l4_yield.
* backtrace.c [USE_L4]: Only include <l4.h> in this case.
[! RM_INTERN]: Include <hurd/thread.h>.
(backtrace_print) [! USE_L4 && ! RM_INTERN]: Use hurd_myself to
get the caller's tid.
[! USE_L4 && RM_INTERN]: Don't print a tid.
* ia32-cmain.c [! USE_L4]: Don't include <l4/globals.h>,
<l4/init.h>, <l4/stubs.h>, or <l4/stubs-init.h>.
(cmain) [! USE_L4]: Don't call l4_init or l4_init_stubs.
* loader.c: Don't include <l4.h>. Include <bits/wordsize.h> and
<endian.h>.
(loader_elf_load): Use __WORDSIZE, __BYTE_ORDER, __LITTLE_ENDIAN
and __BIG_ENDIAN instead of their L4 names.
* panic.c: Include <viengoos/thread.h>.
[! RM_INTERN]: Include <hurd/thread.h>.
(panic_) [! USE_L4 && ! RM_INTERN]: Use hurd_myself, not
l4_myself.
[! USE_L4 && RM_INTERN]: Don't print a tid.
(panic_): Call sched_yield, not l4_yield.
* process-spawn.c (process_spawn) [! USE_L4]: Don't pass utcb and
kip information. Change sp from a l4_word_to to a uintptr_t.
* profile.c [! USE_L4]: Don't include <l4.h>.
(now) [__gnu_hurd_viengoos__ && ! USE_L4]: Just return 0.
(struct profile_block): Change tid to a vg_thread_id_t.
(MYSELF) [__gnu_hurd_viengoos__ && ! USE_L4]: Just return 0.
* s_printf.c (io_buffer_flush) [! USE_L4]: Abort.
libhurd-mm/
2009-01-16 Neal H. Walfield <neal@gnu.org>
* anonymous.h: Don't include <l4/thread.h>. Include
<viengoos/thread.h>.
(struct anonymous_pager): Change fill_thread's type to
vg_thread_id_t.
* anonymous.c (fault): Use hurd_myself and vg_niltid, not
l4_myself and l4_nilthread.
* as-build.c: Don't include <l4.h>.
* as.h: Include <hurd/thread.h>. Don't include <l4/types.h>.
(as_lock): Change as_rwlock_owner's type to vg_thread_id_t. Use
hurd_myself, not l4_myself.
(as_lock_readonly): Likewise.
(as_unlock): Likewise.
* as.c [! USE_L4]: Don't include <l4/types.h> or <l4/kip.h>.
Include <bits/wordsize.h>.
(DATA_ADDR_MAX): Define for 64-bit virtual address spaces.
(as_rwlock_owner): Change type to vg_thread_id_t.
(as_alloc_slow) [USE_L4]: Only check for conflicts with the kip
and utcb in this case.
(as_init) [USE_L4]: Only reserve the kip and utcb in this case.
* exceptions.c [USE_L4]: Only include <l4/thread.h> in this case.
(l4_utcb_state_save) [! USE_L4]: Make a no-op.
(l4_utcb_state_restore) [! USE_L4]: Likewise.
(hurd_activation_handler_normal): Use hurd_myself, not l4_myself.
* map.c: Don't include <l4.h>.
(map_fault): Use VG_WRITE, not L4_FPAGE_WRITABLE.
* storage.c (storage_check_reserve_internal): Change
as_rwlock_owner's type to vg_thread_id_t.
libpthread/
2009-01-16 Neal H. Walfield <neal@gnu.org>
* sysdeps/viengoos/pt-spin.c [USE_L4]: Only include <l4.h> in this
case.
(_pthread_spin_lock): Only implement exponential back off if a
sleep function is available.
* sysdeps/viengoos/pt-stack-alloc.c: Don't include <l4.h>.
* sysdeps/viengoos/pt-sysdep.c (sched_yield) [! USE_L4]: Just
return.
(init_routine) [USE_L4]: Abort.
* sysdeps/viengoos/pt-sysdep.h [USE_L4]: Only include <l4.h> in
this case.
(_pthread_self) [! USE_L4]: Abort.
* sysdeps/viengoos/pt-thread-alloc.c (__pthread_thread_alloc): Use
hurd_myself, not l4_myself.
[! USE_L4]: Abort.
* sysdeps/viengoos/pt-thread-start.c (__pthread_thread_start): Use
hurd_myself, not l4_myself. use uintptr_t, not l4_word_t.
* sysdeps/viengoos/sig-sysdep.h (SIGNAL_DISPATCH_ENTRY)
[! USE_L4]: Abort.
(SIGNAL_DISPATCH_EXIT) [! USE_L4]: Likewise.
libviengoos/
2009-01-16 Neal H. Walfield <neal@gnu.org>
* viengoos/thread.h (VG_READ): Define.
(VG_WRITE): Define.
(VG_EXECUTE): Likewise.
(VG_ACTIVATION_FAULT_INFO_PRINTF): Use them.
ruth/
2009-01-16 Neal H. Walfield <neal@gnu.org>
* ruth.c [USE_L4]: Only include <l4.h> in this case.
(main) [! USE_L4]: Don't print resource manager's thread id.
(main): Use uintptr_t, not l4_word_t. Use hurd_myself, not
l4_myself. Use sched_yield, not l4_yield. Improve
synchronization for object_reply_on_destruction test in case
sched_yield is a no-op.
viengoos/
2009-01-16 Neal H. Walfield <neal@gnu.org>
* cap.h: Don't include <l4.h>.
* mutex.h [USE_L4]: Only include <l4/thread.h> in this case.
(ss_mutex_t) [! USE_L4]: Define to be an int.
(ss_mutex_lock) [! USE_L4]: Make a no-op.
(ss_mutex_unlock) [! USE_L4]: Likewise.
(ss_mutex_trylock) [! USE_L4]: Likewise.
* object.h [USE_L4]: Only include <l4.h> in this case.
(object_desc_unmap) [! USE_L4]: Make a no-op.
(object_desc_flush) [! USE_L4]: Likewise.
* thread.h: Don't include <l4.h>.
(struct thread): Make tid a vg_thread_id_t, not an l4_thread_id_t.
(thread_lookup): Make threadid a vg_thread_id_t, not an
l4_thread_id_t.
|
|
2008-12-18 Neal H. Walfield <neal@gnu.org>
* viengoos/activity.h (struct activity_memory_policy): Rename from
this...
(struct vg_activity_memory_policy): ... to this. Update users.
(struct activity_policy): Rename from this...
(struct vg_activity_policy): ... to this. Update users.
(ACTIVITY_STATS_PERIODS): Rename from this...
(VG_ACTIVITY_STATS_PERIODS): ... to this. Update users.
(struct activity_stats): Rename from this...
(struct vg_activity_stats): ... to this. Update users.
(struct activity_info): Rename from this...
(struct vg_activity_info): ... to this. Update users.
* viengoos/addr.h (struct addr): Rename from this...
(struct vg_addr): ... to this. Update users.
* viengoos/cap.h (struct object_policy): Rename from this...
(struct vg_object_policy): ... to this. Update users.
(struct object_name): Rename from this...
(struct vg_object_name): ... to this. Update users.
(struct object): Rename from this...
(struct vg_object): ... to this. Update users.
* viengoos/folio.h (struct folio_policy): Rename from this...
(struct vg_folio_policy): ... to this. Update users.
(struct folio): Rename for this...
(struct vg_folio): ... to this. Update users.
* viengoos/thread.h
(HURD_EXREGS_SET_UTCB): Rename from this...
(VG_EXREGS_SET_UTCB): ... to this. Update users.
(HURD_EXREGS_SET_EXCEPTION_MESSENGER): Rename from this...
(VG_EXREGS_SET_EXCEPTION_MESSENGER): ... to this. Update users.
(HURD_EXREGS_SET_ASPACE): Rename from this...
(VG_EXREGS_SET_ASPACE): ... to this. Update users.
(HURD_EXREGS_SET_ACTIVITY): Rename from this...
(VG_EXREGS_SET_ACTIVITY): ... to this. Update users.
(HURD_EXREGS_SET_SP): Rename from this...
(VG_EXREGS_SET_SP): ... to this. Update users.
(HURD_EXREGS_SET_IP): Rename from this...
(VG_EXREGS_SET_IP): ... to this. Update users.
(HURD_EXREGS_SET_SP_IP): Rename from this...
(VG_EXREGS_SET_SP_IP): ... to this. Update users.
(HURD_EXREGS_SET_EFLAGS): Rename from this...
(VG_EXREGS_SET_EFLAGS): ... to this. Update users.
(HURD_EXREGS_SET_USER_HANDLE): Rename from this...
(VG_EXREGS_SET_USER_HANDLE): ... to this. Update users.
(HURD_EXREGS_SET_REGS): Rename from this...
(VG_EXREGS_SET_REGS): ... to this. Update users.
(HURD_EXREGS_GET_REGS): Rename from this...
(VG_EXREGS_GET_REGS): ... to this. Update users.
(HURD_EXREGS_START): Rename from this...
(VG_EXREGS_START): ... to this. Update users.
(HURD_EXREGS_STOP): Rename from this...
(VG_EXREGS_STOP): ... to this. Update users.
(HURD_EXREGS_ABORT_SEND): Rename from this...
(VG_EXREGS_ABORT_SEND): ... to this. Update users.
(HURD_EXREGS_ABORT_RECEIVE): Rename from this...
(VG_EXREGS_ABORT_RECEIVE): ... to this. Update users.
(HURD_EXREGS_ABORT_IPC): Rename from this...
(VG_EXREGS_ABORT_IPC): ... to this. Update users.
(struct hurd_thread_exregs_in): Rename form this...
(struct vg_thread_exregs_in): ... to this. Update users.
(struct hurd_thread_exregs_out): Rename form this...
(struct vg_thread_exregs_out): ... to this. Update users.
(RPC_STUB_PREFIX): Define to vg_activation. Update users.
(RPC_ID_PREFIX): Define to VG_ACTIVATION. Update users.
(ACTIVATION_fault): Rename from this...
(VG_ACTIVATION_fault): ... to this. Update users.
|
|
libviengoos/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* viengoos/futex.h (vg_futex_using): Rename from this...
(futex_using): ... to this. Update users. Use vg_futex_using,
not rm_futex_using.
(vg_futex): Rename from this...
(futex): ... to this. Update users.
(vg_futex_wait_using): Rename from this...
(futex_wait_using): ... to this. Update users.
(vg_futex_wake_using): Rename from this...
(futex_wake_using): ... to this. Update users.
libpthread/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* sysdeps/viengoos/pt-block.c (__pthread_block): Use
futex_wait_using, not vg_futex_wait_using.
* sysdeps/viengoos/pt-wakeup.c (__pthread_wakeup): Use
futex_wake_using, not vg_futex_wake_using.
|
|
2008-12-17 Neal H. Walfield <neal@gnu.org>
* viengoos/activity.h (RM_activity_policy): Rename from this...
(VG_activity_policy): ... to this. Update users.
(RM_activity_info): Rename from this...
(VG_activity_info): ... to this. Update users.
(RPC_STUB_PREFIX): Define to vg.
(RPC_ID_PREFIX): Define to VG.
* viengoos/cap.h
(RM_cap_copy): Rename from this...
(VG_cap_copy): ... to this. Update users.
(RM_cap_rubout): Rename from this...
(VG_cap_rubout): ... to this. Update users.
(RM_cap_read): Rename from this...
(VG_cap_read): ... to this. Update users.
(RM_object_discarded_clear): Rename from this...
(VG_object_discarded_clear): ... to this. Update users.
(RM_object_discard): Rename from this...
(VG_object_discard): ... to this. Update users.
(RM_object_status): Rename from this...
(VG_object_status): ... to this. Update users.
(RM_object_reply_on_destruction): Rename from this...
(VG_object_reply_on_destruction): ... to this. Update users.
(RM_object_name): Rename from this...
(VG_object_name): ... to this. Update users.
(RPC_STUB_PREFIX): Define to vg.
(RPC_ID_PREFIX): Define to VG.
* viengoos/folio.h (RM_folio_alloc): Rename from this...
(VG_folio_alloc): ... to this. Update users.
(RM_folio_free): Rename from this...
(Vg_folio_free): ... to this. Update users.
(RM_folio_object_alloc): Rename from this...
(VG_folio_object_alloc): ... to this. Update users.
(RM_folio_policy): Rename from this...
(VG_folio_policy): ... to this. Update users.
(RPC_STUB_PREFIX): Define to vg.
(RPC_ID_PREFIX): Define to VG.
* viengoos/futex.h (RM_futex): Rename from this...
(VG_futex): ... to this. Update users.
(RPC_STUB_PREFIX): Define to vg.
(RPC_ID_PREFIX): Define to VG.
* viengoos/misc.h (RM_write): Rename from this...
(VG_write): ... to this. Update users.
(RM_read): Rename from this...
(VG_read): ... to this. Update users.
(RM_as_dump): Rename from this...
(VG_as_dump): ... to this. Update users.
(RM_fault): Rename from this...
(VG_fault): ... to this. Update users.
(RPC_STUB_PREFIX): Define to vg.
(RPC_ID_PREFIX): Define to VG.
* viengoos/thread.h (RM_thread_exregs): Rename from this...
(RM_thread_exregs): ... to this. Update users.
(RM_thread_id): Rename from this...
(RM_thread_id): ... to this. Update users.
(RM_thread_activation_collect): Rename from this...
(RM_thread_activation_collect): ... to this. Update users.
(RPC_STUB_PREFIX): Define to vg.
(RPC_ID_PREFIX): Define to VG.
|
|
hurd/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* exceptions.h: Merge contents of this file...
* thread.h: ... into this one. Update users.
* headers.m4: Don't link hurd/exceptions.h.
* Makefile.am (includehurd_HEADERS): Remove exceptions.h.
libc-parts/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* backtrace.c: Don't include <hurd/exceptions.h>.
libhurd-mm/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* anonymous.h: Don't include <hurd/exceptions.h>.
* as.h: Likewise.
* exceptions.c: Likewise.
* map.h: Likewise.
* message-buffer.c: Likewise.
* mm-init.c: Likewise.
* as-build.c: Don't include <hurd/exceptions.h>. Include
<viengoos/thread.h> and <viengoos/messenger.h>.
* as-dump.c: Include <viengoos/thread.h> and
<viengoos/messenger.h>.
* as-lookup.c: Likewise.
libpthread/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* sysdeps/viengoos/ia32/pt-setup.c: Don't include
<hurd/exceptions.h> or <viengoos/thread.h>.
* sysdeps/viengoos/pt-startup.c (__pthread_startup): Don't include
<l4.h> or <hurd/exceptions.h>. Include <hurd/thread.h>.
(__pthread_startup): Set pthread->threadid using hurd_myself.
* sysdeps/viengoos/pt-sysdep.h: Don't cinlude
<hurd/exceptions.h>. Include <hurd/thread.h>.
* sysdeps/viengoos/pt-thread-dealloc.c: Don't include
<hurd/exceptions.h>. Include <hurd/thread.h>.
* sysdeps/viengoos/pt-thread-start.c: Don't include
<viengoos/thread.h> or <hurd/exceptions.h>. Include
<hurd/thread.h>.
libviengoos/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* viengoos/misc.h: Don't include <hurd/exceptions.h>.
|
|
2008-12-17 Neal H. Walfield <neal@gnu.org>
* viengoos/activity.h: Add a "vg_" to public viengoos identifiers.
Update users.
* viengoos/addr-trans.h: Likewise.
* viengoos/addr.h: Likewise.
* viengoos/cap.h: Likewise.
* viengoos/folio.h: Likewise.
* viengoos/futex.h: Likewise.
* viengoos/rpc.h: Likewise.
* viengoos/thread.h: Likewise.
|
|
2008-12-17 Neal H. Walfield <neal@gnu.org>
* sysdeps/generic/bits/spin-lock.h: New file.
|
|
libpthread/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* sysdeps/generic/bits/memory.h: New file.
|
|
libpthread/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* signal/signal-dispatch.c: Include <viengoos/math.h>.
(signal_dispatch): Use vg_lsb64, not l4_lsb64.
* sysdeps/viengoos/pt-sigstate.c (__pthread_sigstate): Likewise.
* signal/sigwaitinfo.c (sigwaitinfo): Use vg_msb64, not l4_msb64.
libviengoos/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* t-addr.c: Don't include <l4/math.h>. Include <viengoos/math.h>.
(main): Use vg_msb64 instead of l4_msb64 and vg_lsb64 instead of
l4_lsb64.
viengoos/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* zalloc.c: Don't include <l4/math.h>. Include <viengoos/math.h>.
(zfree): Use vg_msb instead of l4_msb.
* ager.c (update_stats): Likewise.
|
|
/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* libviengoos: New directory.
* Makefile.am (SUBDIRS): Add libviengoos.
* configure.ac: Include libviengoos/headers.m4. Generate
libviengoos/Makefile.
hurd/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* activity.h: Move to ../libviengoos/viengoos. Update references.
* addr-trans.h: Likewise.
* addr.h: Likewise.
* cap.h: Likewise.
* folio.h: Likewise.
* futex.h: Likewise.
* ipc.h: Likewise.
* message.h: Likewise.
* messenger.h: Likewise.
* rpc.h: Likewise.
* thread.h: Move viengoos specific bits...
* ../libviengoos/viengoos/thread.h: ... to this new file.
* thread.h (struct hurd_utcb): New structure.
* exceptions.h (hurd_utcb): Use a struct hurd_utcb *, not a
struct vg_utcb *. Update users.
(hurd_activation_state_alloc): Likewise.
(hurd_activation_state_free): Likewise.
(hurd_activation_handler_activated): Likewise.
(hurd_activation_handler_normal): Likewise.
* t-addr-trans.c: Move to ../libviengoos.
* t-addr.c: Likewise.
* t-rpc.c: Likewise.
* Makefile.am (TESTS, check_PROGRAMS, t_addr_CPPFLAGS)
(t_addr_SOURCES, t_addr_trans_CPPFLAGS, t_addr_trans_SOURCES)
(t_rpc_CPPFLAGS, t_rpc_SOURCES): Move from this file...
* ../libviengoos/Makefile.am.
* Makefile.am (includehurd_HEADERS): Don't mention activity.h,
addr-trans.h, addr.h, cap.h, folio.h, futex.h, ipc.h, message.h or
messenger.h.
* headers.m4: Don't create a link to hurd/addr.h,
hurd/addr-trans.h, hurd/cap.h, hurd/folio.h, hurd/rpc.h,
hurd/activity.h, hurd/futex.h, hurd/message.h, hurd/messenger.h or
hurd/ipc.h.
libviengoos/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* Makefile.am: New file.
* headers.m4: Likewise.
* t-addr-trans.c: Move from ../hurd.
* t-addr.c: Likewise.
* t-rpc.c: Likewise.
* viengoos.h: Likewise.
* viengoos/activity.h: Likewise.
* viengoos/addr-trans.h: Likewise.
* viengoos/addr.h: Likewise.
* viengoos/cap.h: Likewise.
* viengoos/folio.h: Likewise.
* viengoos/futex.h: Likewise.
* viengoos/ipc.h: Likewise.
* viengoos/message.h: Likewise.
* viengoos/messenger.h: Likewise.
* viengoos/rpc.h: Likewise.
* viengoos/misc.h: Moved from ../viengoos/rm.h.
* viengoos/thread.h: New file split from ../hurd/thread.h.
libpthread/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* Makefile.am: New file.
* headers.m4: Likewise.
* t-addr-trans.c: Move from ../hurd.
* t-addr.c: Likewise.
* t-rpc.c: Likewise.
* viengoos.h: Likewise.
* viengoos/activity.h: Likewise.
* viengoos/addr-trans.h: Likewise.
* viengoos/addr.h: Likewise.
* viengoos/cap.h: Likewise.
* viengoos/folio.h: Likewise.
* viengoos/futex.h: Likewise.
* viengoos/ipc.h: Likewise.
* viengoos/message.h: Likewise.
* viengoos/messenger.h: Likewise.
* viengoos/rpc.h: Likewise.
* viengoos/misc.h: Moved from ../viengoos/rm.h.
* viengoos/thread.h: New file split from ../hurd/thread.h.
viengoos/
2008-12-17 Neal H. Walfield <neal@gnu.org>
* rm.h: Move from here...
* ../libviengoos/viengoos/misc.h: ... to here. Update users.
* headers.m4: Don't link rm.h to hurd/rm.h.
* Makefile.am (viengoos_SOURCES): Remove rm.h.
|
|
hurd/
2008-12-11 Neal H. Walfield <neal@gnu.org>
Adapt RPC interfaces according to changes in IPC semantics.
* messenger.h: New file.
* message.h: New file.
* ipc.h: New file.
* headers.m4: Link sysroot/include/hurd/message.h to
hurd/message.h, sysroot/include/hurd/messenger.h to
hurd/messenger.h, and sysroot/include/hurd/ipc.h to hurd/ipc.h.
* cap.h: Include <hurd/addr.h> and <stdbool.h>.
(enum cap_type): Define cap_messenger, cap_rmessenger and
cap_type_count.
(cap_type_string): Handle cap_messenger and cap_rmessenger.
(cap_types_compatible): Likewise.
(cap_type_weak_p): Likewise.
(cap_type_weaken): Likewise.
(cap_type_strengthen): Likewise.
(oid_t): Replace L4 type with standard type.
(CAP_VOID): Define.
* rpc.h [! RPC_TARGET]: Don't error out if not defined.
[RPC_TARGET_ARG_]: Don't define or undefine.
[RPC_TARGET_]: Likewise.
[RPC_TARGET_NEED_ARG]: Ignore.
Don't include <l4/ipc.h> or <l4/space.h>. Include
<hurd/message.h> and <hurd/ipc.h>.
(reply_buffer) [RM_INTERN]: Declare.
(messenger_message_load) [RM_INTERN]: Likewise.
[! RM_INTERN] Include <hurd/message-buffer.h>.
(cap_t): Define.
(CPP_FOREACH): Define.
(CPP_SAFE_DEREF): Likewise.
(RPC_ARGUMENTS): Take additional argument prefix. Use it. Update
users.
(RPC_CHOP): Rename from this...
(RPC_CHOP2): ... to this. Update users.
(RPC_TYPE_SHIFT): New define.
(RPCLOADARG): Rewrite according to new marshalling semantics.
(RPCSTOREARG): Likewise.
(RPC_SEND_MARSHAL): Likewise.
(RPC_SEND_UNMARSHAL): Likewise.
(RPC_REPLY_MARSHAL): Likewise.
(RPC_REPLY_UNMARSHAL): Likewise.
(RPC_RECEIVE_MARSHAL): New define.
(RPC_MARSHAL_GEN_): Break this into...
(RPC_SEND_MARSHAL_GEN_): ... this...
(RPC_RECEIVE_MARSHAL_GEN_): ... this...
(RPC_REPLY_MARSHAL_GEN_): ... and this. Update users.
(RPC_MARSHAL_GEN_): Redefine in terms of the new macros.
(RPC_SEND_): Rewrite according to new marshalling and IPC
semantics.
(RPC_SEND_NONBLOCKING_): Define.
(RPC_): Rewrite according to new marshalling and IPC
semantics.
(RPC_REPLY_): Likewise.
(RPC_SIMPLE_): Don't define.
(RPC_SIMPLE): Don't define.
(RPC): Take additional argument ret_cap_count. Update users.
(rpc_error_reply_marshal): Rewrite according to new marshalling
and IPC semantics.
(rpc_error_reply): Likewise.
* t-rpc.c (RPC_TARGET_NEED_ARG): Don't define.
(RPC_TARGET): Define.
(RPC_noargs): Set to a large interger.
(RPC_caps): New define.
(noargs): Update interface specification according to new IDL
interface. Update users.
(onein): Likewise.
(oneout): Likewise.
(onlyin): Likewise.
(onlyout): Likewise.
(mix): Likewise.
(noargs): Likewise.
(onein): Likewise.
(oneout): Likewise.
(onlyin): Likewise.
(onlyout): Likewise.
(mix): New interface.
(RPC_TARGET): Don't undefine.
(main): Update to use the new RPC marshalling interface. Write a
test using the new `mix' interface.
* activity.h (RPC_TARGET_NEED_ARG): Don't undefine.
(RPC_TARGET): Don't define.
(activity_policy): Update interface specification according to new
IDL interface. Update users.
(activity_info): Likewise.
* cap.h: (RPC_TARGET_NEED_ARG): Don't undefine.
(RPC_TARGET): Don't define.
(RM_object_slot_copy_out): Don't define.
(RM_object_slot_copy_in): Likewise.
(RM_object_slot_read): Likewise.
(RM_object_reply_on_destruction): Define.
(cap_copy): Update interface specification according to new
IDL interface. Update users.
(cap_rubout): Likewise.
(cap_read): Likewise.
(object_discarded_clear): Likewise.
(object_discard): Likewise.
(object_status): Likewise.
(object_name): Likewise.
(object_reply_on_destruction): New interface replacing
thread_wait_destroy.
(object_slot_copy_out): Remove interface.
(object_slot_copy_in): Likewise.
(object_slot_read): Likewise.
(RPC_TARGET): Don't undefine.
* exceptions.h: Don't include <l4/thread.h>. Include
<l4/space.h>.
(RPC_STUB_PREFIX): Redefine to `activation'.
(RPC_ID_PREFIX EXCEPTION): Redefine to `ACTIVATION'.
(RPC_TARGET_NEED_ARG): Don't define.
(RPC_TARGET_ARG_TYPE): Likewise.
(RPC_TARGET): Likewise.
(EXCEPTION_fault): Rename from this...
(ACTIVATION_fault): ... to this. Update users.
(exception_method_id_string): Rename from this...
(activation_method_id_string): ... to this.
(struct exception_info): Rename from this...
(struct activation_fault_info): ... to this. Update users.
(EXCEPTION_INFO_FMT): Rename from this...
(ACTIVATION_FAULT_INFO_FMT): ... to this. Update users.
(EXCEPTION_INFO_PRINTF): Rename from this...
(ACTIVATION_FAULT_INFO_PRINTF): ... to this. Update users.
(fault): Update interface specification according to new IDL
interface. Update users.
* folio.h (RPC_TARGET_NEED_ARG): Don't undefine.
(RPC_TARGET): Don't define.
(folio_alloc): Update interface specification according to new IDL
interface. Update users.
(folio_free): Likewise.
(folio_object_alloc): Likewise.
(folio_policy): Likewise.
(RPC_TARGET): Don't undefine.
* futex.h (RPC_TARGET_NEED_ARG): Don't undefine.
(RPC_TARGET): Don't define.
(futex): Update interface specification according to new IDL
interface. Update users.
(RPC_TARGET): Don't undefine.
(futex_using): New function.
(futex): Implement in terms of it.
(futex_wait_using): New function.
(futex_wait): Implement in terms of it.
(futex_wake_using): New function.
(futex_wake): Implement in terms of it.
* thread.h (RM_thread_wait_object_destroyed): Don't define.
(RM_thread_raise_exception): Rename from this...
(RM_thread_activation_collect): ... to this.
(RM_thread_id): Define.
(RPC_TARGET_NEED_ARG): Don't undefine.
(RPC_TARGET): Don't define.
(struct hurd_thread_exregs_in): Remove fields aspace, activity,
exception_page, aspace_out, activity_out and exception_page_out.
(thread_exregs): Update interface specification according to new
IDL interface. Add additional parameters exception_messenger and
exception_messenger_out. Update users.
(thread_wait_object_destroyed): Remove interface.
(struct exception_buffer): Don't define.
(thread_raise_exception): Remove interface.
(thread_id): New interface.
(thread_activation_collect): Likewise.
(RPC_TARGET): Don't undefine.
* RPC: Update.
* exceptions.h (hurd_activation_handler_init_early): New
declaration.
(hurd_activation_handler_init): Likewise.
(hurd_utcb): Likewise.
(EXCEPTION_STACK_SIZE_LOG2): Don't define.
(EXCEPTION_STACK_SIZE): Likewise.
(hurd_activation_state_alloc): New declaration.
(exception_page_cleanup): Rename from this...
(hurd_activation_state_free): ... to this. Update users.
(exception_handler_activated): Rename from this...
(hurd_activation_handler_activated): ... to this.
(exception_handler_normal): Rename from this...
(hurd_activation_handler_normal): ... to this. Update users.
Take additional parameter utcb.
(exception_handler_entry): Rename from this...
(hurd_activation_handler_entry): ... to this.
(exception_handler_end): Rename from this...
(hurd_activation_handler_end): ... to this.
(hurd_activation_message_register): New declaration.
(hurd_activation_message_unregister): Likewise.
(hurd_activation_stack_dump): Likewise.
* thread.h [! __have_vg_thread_id_t] (__have_vg_thread_id_t):
Define.
[! __have_vg_thread_id_t && USE_L4]: Include <l4.h>.
[! __have_vg_thread_id_t && !USE_L4]: Include <stdint.h>.
[! __have_vg_thread_id_t] (vg_thread_id_t): Define.
[! __have_vg_thread_id_t] (vg_niltid): Define.
[! __have_vg_thread_id_t] (VG_THREAD_ID_FMT): Define.
[! __have_activation_frame] (__have_activation_frame): Define.
[! __have_activation_frame && USE_L4]: Include <l4/ipc.h>.
[! __have_activation_frame] (struct hurd_message_buffer): Declare.
[! __have_activation_frame] (struct activation_frame): Define in
this case. Add fields normal_mode_stack and canary.
[! __have_activation_frame && i386] (struct activation_frame):
Change regs to have 10 elements. Add fields eax, ecx, edx,
eflags, eip, ebx, edi, esi, ebp and esp.
[! __have_activation_frame && !USE_L4] (struct activation_frame):
Remove fields saved_sender, saved_receiver, saved_timeout,
saved_error_code, saved_flags, and saved_br0 in this case.
[__need_vg_thread_id_t || __need_activation_frame]
(__need_vg_thread_id_t): Undefine.
[__need_vg_thread_id_t || __need_activation_frame]
(__need_activation_frame): Likewise.
[!__need_vg_thread_id_t && !__need_activation_frame]: Include the
rest of the file in this case. Include <stdint.h>,
<hurd/types.h>, <hurd/addr.h>, <hurd/addr-trans.h>, <hurd/cap.h>,
<hurd/messenger.h> and <setjmp.h>.
(hurd_activation_frame_longjmp): New declaration.
(struct hurd_fault_catcher): New definition.
(hurd_fault_catcher_register): New declaration.
(hurd_fault_catcher_unregister): Likewise.
(struct exception_page): Rename from this...
(struct vg_utcb): ... to this. Update users. Remove field
exception. Add fields protected_payload, messenger_id,
inline_words, inline_caps, inline_word_count, inline_cap_count,
inline_data, exception_buffer, extant_messages, catchers,
alternate_stack, alternate_stack_inuse, canary0, canary1.
(UTCB_CANARY0): Define.
(UTCB_CANARY1): Likewise.
(THREAD_EXCEPTION_PAGE_SLOT): Rename from this...
(THREAD_UTCB): ... to this.
(THREAD_EXCEPTION_MESSENGER): Define.
(THREAD_SLOTS): Likewise.
(THREAD_SLOTS_LOG2): Likewise.
(HURD_EXREGS_SET_EXCEPTION_PAGE): Rename from this...
(HURD_EXREGS_SET_UTCB): ... to this. Update users.
(HURD_EXREGS_SET_EXCEPTION_MESSENGER): Define.
(HURD_EXREGS_SET_REGS): Add HURD_EXREGS_SET_EXCEPTION_MESSENGER.
(vg_myself): New function.
* startup.h (struct hurd_startup_data): Add field messengers.
viengoos/
2008-12-12 Neal H. Walfield <neal@gnu.org>
Implement messengers and convert to new IPC semantics.
* messenger.h: New file.
* messenger.c: New file.
* Makefile.am (viengoos_SOURCES): Add messenger.h and messenger.c.
* ager.c: Include "messenger.h".
(update_stats): Update notifivation code to use messengers.
* cap.c: Include <hurd/messenger.h>.
(cap_shootdown): Follow thread and messenger objects.
* object.h (object_wait_queue_head): Use and return struct
messenger *'s, not struct thread *'s. Update users.
(object_wait_queue_tail): Likewise.
(object_wait_queue_next): Likewise.
(object_wait_queue_prev): Likewise.
(object_wait_queue_enqueue): Likewise.
(object_wait_queue_dequeue): Likewise. Rename from this...
(object_wait_queue_unlink): ... to this.
(object_wait_queue_push): New declaration.
(folio_object_wait_queue_for_each): Use and return struct
messenger *'s, not struct thread *'s. Update users.
(object_wait_queue_for_each): Likewise.
* object.c: Include <hurd/messenger.h> and "messenger.h".
(folio_object_alloc): When destroying a messenger, call
messenger_destroy.
(folio_object_alloc): Send notifications using messengers.
(object_wait_queue_head): Use and return struct messenger *'s, not
struct thread *'s.
(object_wait_queue_tail): Likewise.
(object_wait_queue_next): Likewise.
(object_wait_queue_prev): Likewise.
(object_wait_queue_check): Likewise.
(object_wait_queue_enqueue): Likewise. Add MESSENGER to end of
the queue, not the beginning.
(object_wait_queue_push): New function.
(object_wait_queue_dequeue): Use and return struct messenger *'s,
not struct thread *'s. Rename from this...
(object_wait_queue_unlink): ... to this.
* pager.c: Include "messenger.h".
* thread.h: Don't include "list.h". Include <hurd/cap.h> and
<hurd/thread.h>.
(struct folio): Remove declaration.
(THREAD_SLOTS): Don't define.
(THREAD_WAIT_FUTEX): Move from here...
* messenger.h (MESSENGER_WAIT_FUTEX): ... to here.
* thread.h (THREAD_WAIT_DESTROY): Move from here...
* messenger.h (MESSENGER_WAIT_DESTROY): ... to here.
* thread.h (THREAD_WAIT_ACTIVITY_INFO): Move from here...
* messenger.h (MESSENGER_WAIT_ACTIVITY_INFO): ... to here.
* thread.h (struct thread): Rename field exception_page to utcb.
Add field exception_messenger. Remove fields wait_queue_p,
wait_queue_head, wait_queue_tail, wait_reason, wait_reason_arg,
wait_reason_arg2, wait_queue and futex_waiter_node.
(futex_waiters): Don't declare.
(thread_exregs): Change input capabilities to not be pointers to
capabilities but just capability structures. Add argument
exception_messenger. Remove arguments aspace_out, activity_out
and exception_page_out. Update users.
(thread_activate): New declaration.
(thread_raise_exception): Change MSG's type to be struct
vg_message *. Update users.
(thread_deliver_pending): New declaration.
* thread.c (thread_deinit): Remove code to remove THREAD from a
wait queue.
(thread_exregs): Change input capabilities to not be pointers to
capabilities but just capability structures. Update code. Add
argument exception_messenger. Set THREAD's exception messenger
according to it and CONTROL. Remove arguments aspace_out,
activity_out and exception_page_out. Don't save the old
capabilities.
(thread_raise_exception): Move body of function...
(thread_activate): ... to this new function. Update to use
messengers.
(thread_raise_exception): Implement in terms of it.
(thread_deliver_pending): New function.
* server.c: Include <hurd/ipc.h> and "messenger.h".
(DEBUG): If label is the IPC label, use "IPC" as the function.
(OBJECT_): Take additional parameter WRITABLE. Save whether the
object is writable in *WRITABLE. Update users.
(OBJECT): Likewise.
(server_loop): Update to use messengers and the new IPC interface.
Update method implementations appropriately. Don't marshal faults
using exception_fault_send_marshal but the new
activation_fault_send_marshal. Remove implementations of
object_slot_copy_out, object_slot_copy_in and object_slot_read.
Reimplement object_discard. In the thread_exregs implementation,
handle the exception messenger. Implement thread_id. Remove
thread_wait_object_destroyed. Implement
object_reply_on_destruction. In activity_info and
activity_policy, don't operate on PRINCIPAL but the invoke
activity. Implement thread_activation_collect. When blocking on
a futex, don't enqueue the calling thread but the reply messenger.
Implement the messenger_id method.
(REPLY): Redefine before processing an object invocation to reply
using the reply messenger included in the request.
* rm.h: Include <l4/message.h>.
(rm_method_id_string): Don't handle object_slot_copy_out,
object_slot_copy_in, object_slot_read, exception_collect or
thread_wait_object_destroyed. Handle object_reply_on_destruction,
thread_id, thread_activation_collect.
(RPC_TARGET_NEED_ARG): Don't undefine.
(RPC_TARGET): Don't define.
(struct io_buffer): Redefine in terms of L4_NUM_BRS.
(write): Update interface specification according to new IDL
interface. Update users.
(read): Likewise.
(as_dump): Likewise.
(fault): Likewise.
(RPC_STUB_PREFIX): Don't undefine.
(RPC_ID_PREFIX): Likewise.
libhurd-mm/
2008-12-12 Neal H. Walfield <neal@gnu.org>
Update to new RPC interface and IPC semantics. Support messengers.
* message-buffer.h: New file.
* message-buffer.c: Likewise.
* Makefile.am (libhurd_mm_a_SOURCES): Add message-buffer.h and
message-buffer.c.
* headers.m4: Link sysroot/include/hurd/message-buffer.h to
libhurd-mm/message-buffer.h.
* exceptions.c: Include <hurd/mm.h>, <hurd/rm.h> and
<backtrace.h>.
(hurd_fault_catcher_register): New function.
(hurd_fault_catcher_unregister): Likewise.
(hurd_activation_frame_longjmp): Likewise.
(utcb_state_save): Rename from this...
(l4_utcb_state_save): ... to this. Take a `struct
activation_frame *', not a `struct exception_frame *'.
(utcb_state_restore): Rename from this...
(l4_utcb_state_restore): ... to this. Take a `struct
activation_frame *', not a `struct exception_frame *'.
(exception_fetch_exception): Rename from this...
(hurd_activation_fetch): ... to this.
(hurd_activation_message_register): New function.
(hurd_activation_frame_longjmp): Likewise.
(exception_frame_slab): Rename from this...
(activation_frame_slab): ... to this. Use a static initializer.
(exception_frame_slab_alloc): Rename from this...
(activation_frame_slab_alloc): ... to this. Don't preserve the L4
utcb.
(exception_frame_slab_dealloc): Rename from this...
(activation_frame_slab_dealloc): ... to this.
(exception_frame_alloc): Rename from this...
(activation_frame_alloc): ... to this. If there are no
preallocated frames, panic. Move the hard allocation code to...
(check_activation_frame_reserve): ... this new function.
(hurd_activation_stack_dump): New function.
(hurd_activation_handler_normal): Take an additional parameter,
the utcb. Add consistency checks. Handle IPC and closures.
Update fault handling code to use the new fault interface. If
unable to resolve the fault via the pager mechanism, see if a
fault catcher in installed. Check the UTCB's canary. If running
on the alternate stack, clear UTCB->ALTERNATE_STACK_INUSE on exit.
(hurd_activation_handler_activated): Take a `struct vg_utcb *',
not a `struct exception_page *'. Handle IPC and closures.
Improve test to determine if the fault was a stack fault. If so,
return to normal mode to handle the fault and use an alternate
stack.
(activation_handler_area0): New local variable.
(activation_handler_msg): Likewise.
(initial_utcb): Likewise.
(simple_utcb_fetcher): New function.
(hurd_utcb): New variable.
(hurd_activation_handler_init_early): New function.
(hurd_activation_handler_init): Likewise.
(exception_handler_init): Remove function.
(ACTIVATION_AREA_SIZE_LOG2): Define.
(ACTIVATION_AREA_SIZE): Likewise.
(hurd_activation_state_alloc): New function.
(exception_page_cleanup): Rename from this...
(hurd_activation_state_free): ... to this. Rewrite.
* ia32-exception-entry.S (_hurd_activation_handler_entry): Save
the eflags before executing a sub instruction. Don't try to
smartly calculate the location of the UTCB. Instead, just reload
it.
(activation_frame_run): Use an alternate stack, if requested.
Save ebx and ebi. Pass the utcb to the callback.
* mm-init.c [i386]: Include <hurd/pager.h>.
Include <backtrace.h>.
(mm_init): Call hurd_activation_handler_init_early and
hurd_activation_handler_init. Don't call exception_handler_init.
(mm_init) [! NDEBUG && i386]: Test the activation code.
* as-build.c (do_index): Handle indexing a cap_thread or a
cap_messenger.
(as_build): Likewise.
* as-dump.c (do_walk): Handle indexing a cap_thread or a
cap_messenger.
* as-lookup.c (as_lookup_rel_internal): Likewise.
* as.c (as_walk): Likewise.
* storage.c: Include <backtrace.h>.
(shadow_setup): Update use of rm_folio_object_alloc according to
its new interface.
(storage_check_reserve_internal): Likewise.
(storage_free_): Likewise.
(FREE_PAGES_SERIALIZE): Bump to 32.
(storage_alloc): If we try to get storage more than 5 lives, print
a warning that we may be experiencing live lock.
* pager.h (pager_fault_t): Change info's type from `struct
exception_info' to `struct activation_fault_info'.
(PAGER_VOID): Define.
* map.h: Don't include <hurd/exceptions.h>. Include <hurd/as.h>.
(maps_lock_lock): Don't use EXCEPTION_STACK_SIZE but
AS_STACK_SPACE.
(map_fault): Change info's type from `struct exception_info' to
`struct activation_fault_info'.
* map.c (map_fault): Change info's type from `struct
exception_info' to `struct activation_fault_info'.
* as.h (AS_STACK_SPACE): Define.
(as_lock): Use AS_STACK_SPACE instead of EXCEPTION_STACK_SIZE.
(as_lock_readonly): Likewise.
* as.h (AS_CHECK_SHADOW): Only check the address translator for
capabilities that designate cappages.
* anonymous.h (ANONYMOUS_MAGIC): Define.
(struct anonymous_pager): Add field magic.
* anonymous.c (fault): Assert that ANON->MAGIC has the expected
value. Correctly size PAGES.
(mdestroy): Assert that ANON->MAGIC has the expected value.
(destroy): Likewise.
(advise): Likewise.
(anonymous_pager_alloc): Initialize ANON->MAGIC.
benchmarks/
2008-12-12 Neal H. Walfield <neal@gnu.org>
Update according to new RPC interfaces.
* activity-distribution.c (main): Update use of rm_activity_policy
and rm_activity_info to be consistent with the new interface.
Replace use of `struct exception_info' with `struct
activation_fault_info'.
* cache.c (helper): Update use of rm_activity_policy and
rm_activity_info to be consistent with the new interface.
* shared-memory-distribution.c (main): Likewise.
hieronymus/
2008-12-12 Neal H. Walfield <neal@gnu.org>
Update according to new RPC interfaces.
* hieronymus.c (activity_alloc): Update use of rm_activity_policy,
rm_activity_info and rm_folio_object_alloc to be consistent with
new interface. Replace use of rm_thread_wait_object_destroyed
with rm_object_reply_on_destruction.
libc-parts/
2008-12-11 Neal H. Walfield <neal@gnu.org>
Update to new RPC interfaces.
* _exit.c (_exit): Update use of rm_folio_object_alloc to be
consistent with the new interface.
* backtrace.c (RA) [!RM_INTERN]: Set up a fault catch handler to
avoid gratuitously faulting.
(backtrace) [!RM_INTERN]: Set up a jump buffer. Jump to it on a
fault.
(backtrace_print): Use s_printf, not printf.
* ia32-crt0.S (STACK_SIZE): Increase to 128 kb.
* process-spawn.c (process_spawn): Don't use a capability slot to
identify the root of the new thread's address space, allocate a
thread object. Allocate messengers for the new thread and save
them in STARTUP_DATA->MESSENGERS.
* s_printf.c (io_buffer_flush): Use the debug output interface.
(s_putchar): Don't call rm_write but use io_buffer_flush.
libpthread/
2008-12-11 Neal H. Walfield <neal@gnu.org>
Update to new RPC interfaces, IPC semantics.
* sysdeps/viengoos/bits/pthread-np.h: Include <hurd/exceptions.h>.
(pthread_hurd_utcb_np): New declaration.
* sysdeps/viengoos/pt-hurd-utcb-np.c: New file.
* Makefile.am (libpthread_a_SOURCES): Add pt-hurd-utcb.c.
* sysdeps/viengoos/pt-sysdep.h (EXCEPTION_AREA_SIZE): Don't
define.
(EXCEPTION_AREA_SIZE_LOG2): Likewise.
(EXCEPTION_PAGE): Likewise.
(PTHREAD_SYSDEP_MEMBERS): Remove fields exception_area, and
exception_area_va. Add fields utcb and lock_message_buffer.
* sysdeps/viengoos/pt-thread-alloc.c: Include
<hurd/message-buffer.h>.
(__pthread_thread_alloc): Initialize thread->lock_message_buffer.
When executed the first time, set the thread's L4 user-defined
handler. Initialize THREAD->UTCB with the thread's current utcb.
Set HURD_UTCB to PTHREAD_HURD_UTCB_NP. For subsequent threads,
don't manually set up the activation area. Instead, call
hurd_activation_state_alloc.
* sysdeps/viengoos/pt-thread-dealloc.c: Include
<hurd/message-buffer.h>.
(__pthread_thread_dealloc): Call __pthread_thread_halt. Don't
manually clean up the activation area. Instead, call
hurd_activation_state_free. Free THREAD->LOCK_MESSAGE_BUFFER.
* sysdeps/viengoos/ia32/pt-setup.c (stack_setup): Pre-fault the
first four pages of the new stack.
(__pthread_setup): Don't set up the activation area.
* sysdeps/viengoos/pt-wakeup.c (__pthread_wakeup): Use
futex_wake_using with the calling thread's lock messenger.
* sysdeps/viengoos/pt-block.c (__pthread_block): Use
futex_wait_using and provide THREAD->LOCK_MESSAGE_BUFFER as the
message buffer.
* sysdeps/viengoos/pt-thread-start.c (__pthread_thread_start):
Don't set the first thread's L4 user-defined handler here.
(__pthread_thread_start): Update use of rm_thread_exregs according
to be consistent with new interface.
* sysdeps/viengoos/pt-thread-halt.c (__pthread_thread_halt): If
THREAD is the current thread, call vg_suspend.
* sysdeps/viengoos/pt-setactivity-np.c (pthread_setactivity_np):
Update use of rm_thread_exregs according to be consistent with new
interface.
* sysdeps/viengoos/ia32/signal-dispatch-lowlevel.c
(signal_dispatch_lowlevel): Use __builtin_frame_address to get the
current stack frame's start. Update use of rm_thread_exregs
according to be consistent with new interface.
ruth/
2008-12-12 Neal H. Walfield <neal@gnu.org>
Update to new RPC interfaces.
* ruth.c (main): Update use of rm_folio_alloc,
rm_folio_object_alloc, rm_thread_exregs, rm_activity_policy,
rm_activity_info. Replace use of rm_thread_wait_object_destroy
with rm_object_reply_on_destruction. Replace use of `struct
exception_info' with `struct activation_fault_info'. Fix signal
test's use of condition variables to not rely on the scheduler.
When checking deallocation code, set up a fault handler to
programmatically determine success.
|
|
2008-12-11 Neal H. Walfield <neal@gnu.org>
* sysdeps/generic/bits/spin-lock-inline.h: New file.
|
|
* Makefile.am (SYSDEP_PATH): Replace l4/hurd with viengoos.
Remove other directory names containing l4.
(libpthread_a_SOURCES): Remove pt-pool-np.c.
* sysdeps/l4/pt-spin.c: Move from here...
* sysdeps/viengoos/pt-spin.c: ... to here.
* sysdeps/l4/pt-stack-alloc.c: Move from here...
* sysdeps/viengoos/pt-stack-alloc.c: ... to here.
* sysdeps/l4/pt-timedblock.c: Move from here...
* sysdeps/viengoos/pt-timedblock.c: ... to here.
* sysdeps/l4/hurd/pt-block.c: Move from here...
* sysdeps/viengoos/pt-block.c: ... to here.
* sysdeps/l4/hurd/pt-docancel.c: Move from here...
* sysdeps/viengoos/pt-docancel.c: ... to here.
* sysdeps/l4/hurd/pt-kill.c: Move from here...
* sysdeps/viengoos/pt-kill.c: ... to here.
* sysdeps/l4/hurd/pt-setactivity-np.c: Move from here...
* sysdeps/viengoos/pt-setactivity-np.c: ... to here.
* sysdeps/l4/hurd/pt-sigstate-destroy.c: Move from here...
* sysdeps/viengoos/pt-sigstate-destroy.c: ... to here.
* sysdeps/l4/hurd/pt-sigstate-init.c: Move from here...
* sysdeps/viengoos/pt-sigstate-init.c: ... to here.
* sysdeps/l4/hurd/pt-sigstate.c: Move from here...
* sysdeps/viengoos/pt-sigstate.c: ... to here.
* sysdeps/l4/hurd/pt-startup.c: Move from here...
* sysdeps/viengoos/pt-startup.c: ... to here.
* sysdeps/l4/hurd/pt-sysdep.c: Move from here...
* sysdeps/viengoos/pt-sysdep.c: ... to here.
* sysdeps/l4/hurd/pt-sysdep.h: Move from here...
* sysdeps/viengoos/pt-sysdep.h: ... to here.
* sysdeps/l4/hurd/pt-thread-alloc.c: Move from here...
* sysdeps/viengoos/pt-thread-alloc.c: ... to here.
* sysdeps/l4/hurd/pt-thread-dealloc.c: Move from here...
* sysdeps/viengoos/pt-thread-dealloc.c: ... to here.
* sysdeps/l4/hurd/pt-thread-halt.c: Move from here...
* sysdeps/viengoos/pt-thread-halt.c: ... to here.
* sysdeps/l4/hurd/pt-thread-start.c: Move from here...
* sysdeps/viengoos/pt-thread-start.c: ... to here.
* sysdeps/l4/hurd/pt-wakeup.c: Move from here...
* sysdeps/viengoos/pt-wakeup.c: ... to here.
* sysdeps/l4/hurd/sig-sysdep.h: Move from here...
* sysdeps/viengoos/sig-sysdep.h: ... to here.
* sysdeps/l4/hurd/sigprocmask.c: Move from here...
* sysdeps/viengoos/sigprocmask.c: ... to here.
* sysdeps/l4/hurd/bits/pthread-np.h: Move from here...
* sysdeps/viengoos/bits/pthread-np.h: ... to here.
* headers.m4: Like sysroot/include/bits/pthread-np.h to
libpthread/sysdeps/viengoos/bits/pthread-np.h, not
libpthread/sysdeps/l4/hurd/bits/pthread-np.h.
* sysdeps/l4/hurd/ia32/pt-machdep.c: Move from here...
* sysdeps/viengoos/ia32/pt-machdep.c: ... to here.
* sysdeps/l4/hurd/ia32/pt-setup.c: Move from here...
* sysdeps/viengoos/ia32/pt-setup.c: ... to here.
* sysdeps/l4/hurd/ia32/signal-dispatch-lowlevel.c: Move from
here...
* sysdeps/viengoos/ia32/signal-dispatch-lowlevel.c: to here...
* sysdeps/l4/hurd/powerpc/pt-machdep.c: Move from here...
* sysdeps/viengoos/powerpc/pt-machdep.c: ... to here.
* sysdeps/l4/hurd/powerpc/pt-setup.c: Move from here...
* sysdeps/viengoos/powerpc/pt-setup.c: ... to here.
|
|
* sysdeps/l4/pt-block.c: Remove file.
* sysdeps/l4/pt-docancel.c: Likewise.
* sysdeps/l4/pt-pool-np.c: Likewise.
* sysdeps/l4/pt-thread-alloc.c: Likewise.
* sysdeps/l4/pt-thread-dealloc.c: Likewise.
* sysdeps/l4/pt-thread-halt.c: Likewise.
* sysdeps/l4/pt-thread-start.c: Likewise.
* sysdeps/l4/pt-wakeup.c: Likewise.
* sysdeps/l4/bits/pthread-np.h: Likewise.
|
|
2008-08-16 Neal H. Walfield <neal@gnu.org>
* thread.h (thread_start_sp_ip): New function.
libpthread/
2008-08-16 Neal H. Walfield <neal@gnu.org>
* sysdeps/l4/hurd/pt-docancel.c: New file.
|
|
* pthread/pt-alloc.c: Don't include <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 <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-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/l4/hurd/pt-thread-halt.c (__pthread_thread_halt): Remove
argument need_dealloc. Move the deallocation code from this
file...
* sysdeps/l4/hurd/pt-thread-dealloc.c: ... to this new file.
* sysdeps/l4/hurd/pt-sysdep.h (PTHREAD_SYSDEP_MEMBERS): Add field
have_kernel_resources.
* sysdeps/l4/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.
|
|
* sysdeps/generic/bits/pthreadtypes.h: Remove dead file.
|
|
* sysdeps/generic/bits/pthread-np.h: New file.
|
|
* sysdeps/ia32/machine-sp.h (thread_stack_pointer):
Optimize esp read.
|
|
* sysdeps/generic/pt-startup.c (__pthread_startup): New file.
|
|
2008-08-12 Neal H. Walfield <neal@gnu.org>
* sysdeps/generic/bits/mutex.h (__PTHREAD_RECURSIVE_MUTEX_INITIALIZER):
Define.
(__PTHREAD_MUTEX_RECURSIVE_INITIALIZER): Don't define.
* include/pthread/pthread.h
(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) [__USE_GNU]: Define.
(PTHREAD_MUTEX_RECURSIVE_INITIALIZER_NP): Don't define.
libhurd-mm/
2008-08-12 Neal H. Walfield <neal@gnu.org>
* storage.c (storage_low_mutex): Use
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP, not
PTHREAD_MUTEX_RECURSIVE_INITIALIZER_NP.
|
|
Merge in Samuel Thibault's changes from the main line.
* Makefile.am (libpthread_a_SOURCES): Add pt-getattr.c.
* headers.m4: Link libpthread/include/pthread/pthreadtypes.h to
sysroot/include/pthread/pthreadtypes.h and
libpthread/sysdeps/${arch}/bits/spin-lock-inline.h. to
sysroot/include/bits/spin-lock-inline.h.
* include/pthread/pthread.h: Include <sys/cdefs.h>.
(__extern_inline): If not defined, define appropriately.
2008-08-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
* include/pthread/pthreadtypes.h (__pthread_inheritsched): Remove
comma at end of enumeration.
2008-08-03 Samuel Thibault <samuel.thibault@ens-lyon.org>
* Makefile (sysdeps_headers): Add spin-lock-inline.h.
(SYSDEP_PATH): Move sysdeps/ia32 right after
sysdeps/$(MICROKERNEL)/ia32.
* include/pthread/pthread.h: Include <bits/spin-lock-inline.h>.
* sysdeps/ia32/bits/spin-lock.h: Move inlines to...
* sysdeps/ia32/bits/spin-lock-inline.h: ... new file.
2008-08-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
* sysdeps/generic/bits/mutex.h: Do not include <errno.h> and
<stddef.h>
* sysdeps/ia32/bits/memory.h (__memory_barrier): Add memory clobber.
* sysdeps/ia32/bits/spin-lock.h (__pthread_spin_trylock,
__pthread_spin_unlock): Add memory clobbers.
* sysdeps/l4/hurd/ia32/pt-setup.c (stack_setup): Fix reservation of
stack room for initial frame.
2008-07-18 Samuel Thibault <samuel.thibault@ens-lyon.org>
* Makefile (sysdeps_headers): add pthread/pthreadtypes.h
2008-06-27 Samuel Thibault <samuel.thibault@ens-lyon.org>
* include/pthread/pthread.h: Do not define __need_clockid_t, include
<time.h>, and define clockid_t if __clockid_defined is not defined.
Include <pthread/pthreadtypes.h>
(pthread_equal): New extern inline.
(pthread_cleanup_push, pthread_cleanup_pop): New macros.
(__pthread_process_shared, __pthread_inheritsched,
__pthread_contentionscope, __pthread_detachstate,
__pthread_mutex_protocol, __pthread_mutex_type,
pthread_attr_t, pthread_mutex_attr_t, pthread_mutex_t,
pthread_condattr_t, pthread_cond_t, pthread_spinlock_t,
pthread_rwlockattr_t, pthread_rwlock_t, pthread_barrierattr_t,
pthread_barrier_t, pthread_key_t, pthread_once_t): Move enums and
typedefs to...
* include/pthread/pthreadtypes.h: ... new file.
* sysdeps/generic/bits/cancelation.h (pthread_cleanup_push): Rename
macro to __pthread_cleanup_push.
(pthread_cleanup_pop): Rename macro to __pthread_cleanup_pop.
* sysdeps/generic/bits/barrier-attr.h (__pthread_process_shared):
Forward-declare enum.
* sysdeps/generic/bits/condition-attr.h (__pthread_process_shared):
Likewise.
* sysdeps/generic/bits/mutex-attr.h (__pthread_mutex_protocol,
__pthread_process_shared, __pthread_mutex_type):
Likewise.
* sysdeps/generic/bits/rwlock-attr.h (__pthread_process_shared):
Likewise.
* sysdeps/generic/bits/thread-attr.h (__pthread_detachstate,
__pthread_inheritsched, __pthread_contentionscope):
Likewise.
* sysdeps/generic/bits/pthread.h (pthread_t): Rename type to
__pthread_t.
(pthread_equal): Rename to __pthread_equal.
2008-06-27 Samuel Thibault <samuel.thibault@ens-lyon.org>
* sysdeps/generic/bits/thread-barrier.h: Remove unused file.
2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
* include/pthread/pthread.h (pthread_getattr_np): New declaration.
* pthread/pt-getattr.c: New file.
* Makefile (SRCS): Add pt-getattr.c.
2008-03-16 Samuel Thibault <samuel.thibault@ens-lyon.org>
* include/libc-symbols.h (HAVE_ASM_PREVIOUS_DIRECTIVE): Define.
2008-02-29 Samuel Thibault <samuel.thibault@ens-lyon.org>
* sysdeps/l4/hurd/ia32/pt-setup.c (stack_setup): Align stack on 0x10
for MMX operations.
2008-01-01 Samuel Thibault <samuel.thibault@ens-lyon.org>
* include/pthread/pthread.h (pthread_spin_destroy, pthread_spin_init,
pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock): Use
__extern_inline macro instead of extern __inline.
* sysdeps/ia32/bits/spin-lock.h (__PT_SPIN_INLINE,
__pthread_spin_lock): Likewise
* sysdeps/generic/bits/pthread.h (pthread_equal): Declare ; only
provide inline when __USE_EXTERN_INLINES is defined. Use __extern_inline
macro instead of extern __inline.
* sysdeps/ia32/bits/memory.h (__memory_barrier): Add static to inline.
|
|
2008-06-22 Neal H. Walfield <neal@gnu.org>
* thread.h: Include "list.h".
(struct thread) [! NDEBUG]: Add field futex_waiter_node.
[! NDEBUG]: Instantiate the futex_waiter list class.
(futex_waiters) [! NDEBUG]: Declare.
* server.c (futex_waiters) [! NDEBUG]: New variable.
(server_loop) [! NDEBUG]: If we don't get an RPC for a while,
dequeue all thread's enqueued on FUTEX_WAITERS and return EDEADLK.
When blocking a thread on a futex, add THREAD to FUTEX_WAITERS.
* object.c (object_wait_queue_dequeue) [! NDEBUG]: If
THREAD->WAIT_REASON is THREAD_WAIT_FUTEX, unlink THREAD from
FUTEX_WAITERS.
hurd/
2008-06-22 Neal H. Walfield <neal@gnu.org>
* futex.h [! RM_INTERN]: Include <errno.h>.
(futex_wait): On error, set ERRNO and return -1.
(futex_timed_wait): Likewise.
(futex_wake): Likewise.
* mutex.h (ss_mutex_lock): If FUTEX_WAIT returns failure, print
some debugging information.
|
|
* sysdeps/generic/pt-mutex-timedlock.c
(__pthread_mutex_timedlock_internal): Don't set MUTEX->OWNER here.
* sysdeps/generic/pt-mutex-unlock.c (__pthread_mutex_unlock): Set
it here to WAKEUP.
|
|
2008-06-05 Neal H. Walfield <neal@gnu.org>
* cap-lookup.c: Move from here...
* ../libhurd-mm/as-lookup.c: ... to here.
* as.c: Move from here...
* ../libhurd-mm/as-build.c: ... to here.
* as-custom.c: Move from here...
* ../libhurd-mm/as-build-custom.c: ... to here.
* as.h: Move contents...
* ../libhurd-mm/as.h: ... to here...
* ../libhurd-mm/as-compute-gbits.h: ... and to here.
* bits.h: Move from here...
* ../libhurd-mm/bits.h: ... to here.
* Makefile.am (viengoos_SOURCES): Remove cap-lookup.c, as.h and
as.c.
(t_as_SOURCES): Likewise.
(t_activity_SOURCES): Likewise.
(viengoos_LDADD): Add ../libhurd-mm/libas-kernel.a.
(t_as_LDADD): Add ../libhurd-mm/libas-check.a.
(t_activity_LDADD): Likewise.
(lib_LIBRARIES): Remove libhurd-cap.a.
(libhurd_cap_a_CPPFLAGS): Remove variable.
(libhurd_cap_a_CFLAGS): Likewise.
(libhurd_cap_a_SOURCES): Likewise.
* server.c (server_loop): Replace use of object_lookup_rel with
as_object_lookup_rel. Replace use of slot_lookup_rel with
as_slot_lookup_rel_use. Replace use of cap_lookup_rel with
as_cap_lookup_rel.
* viengoos.c: Don't include "as.h", include <hurd/as.h>.
* t-activity.c: Don't include "as.h", include <hurd/as.h>.
(allocate_object): Change return type to struct
as_allocate_pt_ret.
* t-as.c: Don't include "as.h", include <hurd/as.h>.
(allocate_object): Change return type to struct
as_allocate_pt_ret.
(allocate_page_table): New function.
(try): Replace use of as_insert with as_insert_full. Replace use
of slot_lookup_rel with as_slot_lookup_rel_use. Replace use of
object_lookup_rel with as_object_lookup_rel.
(test): Likewise.
* t-guard.c: Don't include "as.h", include <hurd/as.h>. Include
"../libhurd-mm/as-compute-gbits.h".
libhurd-mm/
2008-06-05 Neal H. Walfield <neal@gnu.org>
* as.h: Include <hurd/exceptions.h>.
[! RM_INTERN]: Include <hurd/storage.h> and <pthread.h>.
(as_lock_ensure_stack) [! RM_INTERN]: New function.
(as_lock): New function.
(as_lock_readonly): Likewise.
(as_unlock): Likewise.
(meta_data_activity) [RM_INTERN]: Don't declare.
(shadow_root) [RM_INTERN]: Don't declare.
(struct as_insert_rt): Rename from this...
(struct as_allocate_pt_ret): ... to this. Update users.
(as_allocate_page_table_t): New typedef.
(as_allocate_page_table): New declaration.
(as_build): New declaration.
(as_build_custom): Likewise.
(as_slot_ensure): Remove declaration.
(as_ensure_full): New macro.
(as_ensure_use) [! RM_INTERN]: Likewise.
(as_ensure) [! RM_INTERN]: New function.
(as_insert): Rename from this...
(as_insert_full): ... to this. Don't return the capability.
Reverse the order of the source address and cap. Replace
allocate_object parameter with an allocate_page_table parameter.
Update users.
(as_insert) [! RM_INTERN]: New function.
(as_slot_ensure_full_custom): Rename from this...
(as_ensure_full_custom): ... to this. Replace allocate_object
parameter with an allocate_page_table parameter.
(as_insert_custom): Likewise.
(union as_lookup_ret): New definition.
(as_lookup_want_cap): New definition.
(as_lookup_want_slot): Likewise.
(as_lookup_want_object): Likewise.
(as_lookup_rel): New declaration.
(slot_lookup): Remove declaration.
(as_slot_lookup_rel_use): Replace it with this macro.
(as_slot_lookup_use) [! RM_INTERN]: New macro.
(as_cap_lookup_rel): New function.
(cap_lookup): Rename from this...
(as_cap_lookup) [! RM_INTERN]: ... to this. Remove activity
parameter. Implement here as a static inline function.
(as_object_lookup_rel): New function.
(object_lookup): Rename from this...
(as_object_lookup) [! RM_INTERN]: ... to this. Remove activity
parameter. Implement here as a static inline function.
(as_dump_from): New declaration.
* as-compute-gbits.h: Include <hurd/folio.h>.
* as.c (allocate_object): Rename from this...
(as_allocate_page_table): ... to this. Remove static qualifier.
Don't take parameter type, just allocate a cap_cappage.
(as_slot_ensure): Remove function.
(as_init): Replace use of slot_lookup_rel with as_slot_lookup_use
or as_cap_lookup as appropriate.
(cap_lookup): Remove function.
(object_lookup): Likewise.
(slot_lookup): Likewise.
(as_dump): Likewise.
* as-build.c: Don't include "as.h", but <hurd/as.h>. Include
<hurd/rm.h>, "as-compute-gbits.h".
[RM_INTERN]: Don't include "object.h" but "../viengoos/object.h".
(CUSTOM) [ID_SUFFIX]: Define.
(as_build_internal): Rename from this...
(as_build): ... to this. Remove static qualifier. Replace
parameter allocate_object with allocate_page_table. Use it
instead.
(as_slot_ensure_full): Remove function.
(as_insert): Likewise.
* as-build-custom.c (as_object_index_t): Remove definition.
(AS_LOCK): Don't define.
(AS_UNLOCK): Don't define.
(as_ensure_full_custom): New function.
(as_insert_custom): Likewise.
* as-lookup.c: Include <hurd/as.h>.
[RM_INTERN]: Don't include "object.h" but "../viengoos/object.h".
[! RM_INTERN]: Include <pthread.h>.
(as_lock) [! RM_INTERN]: Rename from this...
(as_rwlock) [! RM_INTERN]: ... to this.
(ensure_stack) [! RM_INTERN]: Remove function.
(AS_LOCK): Don't define.
(AS_UNLOCK): Don't define.
(lookup): Rename from this...
(as_lookup_rel): ... to this. Change mode's type to an enum
as_lookup_mode. Change rt's type to a union as_lookup_ret. Don't
use want_object but as_lookup_want_object. Don't use want_slot
but as_lookup_want_slot. Don't use want_cap but
as_lookup_want_cap.
(cap_lookup_rel): Remove function.
(object_lookup_rel): Likewise.
(slot_lookup_rel): Likewise.
(print_nr): Move from here...
* as-lookup.c (do_walk): Move from here...
* as-dump.c (do_walk): ... to here.
* as-lookup.c (as_dump_from): Move from here...
* as-dump.c (as_dump_from): ... to here.
* Makefile.am (lib_LIBRARIES) [ENABLE_TESTS]: Set to libas-check.a
(lib_LIBRARIES) [! ENABLE_TESTS]: Add libas-kernel.a.
(libhurd_mm_a_SOURCES): Add bits., as-build.c as-build-custom.c,
as-lookup.c and as-dump.c.
(libas_kernel_a_CPPFLAGS): New variable.
(libas_kernel_a_CCASFLAGS): New variable.
(libas_kernel_a_CFLAGS): New variable.
(libas_kernel_a_SOURCES): New variable.
(libas_check_a_CPPFLAGS): New variable.
(libas_check_a_CCASFLAGS): New variable.
(libas_check_a_CFLAGS): New variable.
(libas_check_a_SOURCES): New variable.
* anonymous.c (fault): Replace use of as_slot_ensure with
as_ensure.
* exceptions.c (exception_handler_init): Replace use of
as_slot_ensure with as_ensure.
* storage.c (storage_check_reserve_internal): Replace use of
as_lock with as_rwlock. Replace use of as_slot_ensure with and
slot_lookup with as_ensure and as_slot_lookup_use.
(storage_alloc): Replace use of slot_lookup with
as_slot_lookup_use.
hurd/
2008-06-05 Neal H. Walfield <neal@gnu.org>
* cap.h: Don't include <pthread.h>.
(as_lock): Remove declaration.
(cap_lookup_rel): Likewise.
(object_lookup_rel): Likewise.
(slot_lookup_rel): Likewise.
/
2008-06-05 Neal H. Walfield <neal@gnu.org>
* libc.a.in: Remove -lhurd-cap.
* Makefile.am (libc-stmp): Remove dependency on
viengoos/libhurd-cap.a.
2008-06-05 Neal H. Walfield <neal@gnu.org>
* process-spawn.c (as_insert_custom): Replace use of as_insert
with as_insert_full.
(allocate_object): Change return type to struct
as_allocate_pt_ret. Replace use of as_slot_ensure with
as_ensure_use.
(allocate_page_table): New function.
(process_spawn): Update use of as_insert_custom to be consistent
with new API, in particular, pass allocate_page_table instead of
allocate_object. Replace use of object_lookup_rel with
as_object_lookup_rel.
libpthread/
2008-06-05 Neal H. Walfield <neal@gnu.org>
* sysdeps/l4/hurd/pt-thread-alloc.c (__pthread_thread_alloc):
Replace use of as_slot_ensure with as_ensure.
ruth/
2008-06-05 Neal H. Walfield <neal@gnu.org>
* ruth.c (main): Replace use of slot_lookup with as_cap_lookup.
Replace use of as_slot_ensure with as_ensure_use. Replace use of
slot_lookup with as_slot_lookup_use.
|
|
* include/pthread/pthread.h (PTHREAD_MUTEX_RECURSIVE_INITIALIZER_NP):
New definition.
* sysdeps/generic/bits/mutex.h
(__PTHREAD_MUTEX_RECURSIVE_INITIALIZER): New definition.
* sysdeps/generic/bits/mutex-attr.h (__pthread_recursive_mutexattr):
New definition.
* sysdeps/generic/pt-mutexattr.c (__pthread_recursive_mutexattr):
New declaration.
* sysdeps/generic/pt-mutex-init.c (_pthread_mutex_init): If ATTR
is &__PTHREAD_RECURSIVE_MUTEXATTR, don't allocate a copy, just
save in MUTEX->ATTR.
* sysdeps/generic/pt-mutex-destroy.c (_pthread_mutex_destroy): If
MUTEX->ATTR is &__PTHREAD_RECURSIVE_MUTEXATTR, don't free it.
|
|
* sysdeps/generic/sem-timedwait.c: Don't include <error.h>.
|
|
2008-05-29 Neal H. Walfield <neal@gnu.org>
* exceptions.c (exception_handler_activated): Assume the fault is
on the stack if it is one page above or three pages below the
stack pointer.
(exception_handler_init): Allocate an area of address space
EXCEPTION_STACK_SIZE bytes larges. Fill it with pages. Set the
first page as the thread's exception page and the top of the area
minus one word as the stack pointer. Set the last word to the
location of the exception page.
* ia32-exception-entry.S: Include <hurd/exceptions.h>.
(PAGESIZE): Don't define.
(_exception_handler_entry): Rewrite to not assume that the
exception page is at the start of the page in which the stack
pointer is, but at the location stored in the word after the bottom
of the stack.
* Makefile.am (libhurd_mm_a_CCASFLAGS): New variable.
* pager.c (ensure_stack): Change SPACE to be EXCEPTION_STACK_SIZE
- PAGESIZE bytes large. Write to each page.
libpthread/
2008-05-29 Neal H. Walfield <neal@gnu.org>
* sysdeps/l4/hurd/pt-sysdep.h Include <hurd/exceptions.h>.
(EXCEPTION_AREA_SIZE): Define.
(EXCEPTION_AREA_SIZE_LOG2): Likewise.
(EXCEPTION_PAGE): Likewise.
(PTHREAD_SYSDEP_MEMBERS): Change object's type to an addr_t.
Update users. Remove field exception_page, replace with
exception_area. Add field exception_area_va.
* sysdeps/l4/hurd/pt-thread-alloc.c: Include <hurd/as.h> and
<hurd/addr.h>.
(__pthread_thread_alloc): Allocate EXCEPTION_AREA_SIZE bytes of
address space. Save it in THREAD->EXCEPTION_AREA_VA. Allocate a
page for each page in that area. Save them in
THREAD->EXCEPTION_AREA.
* sysdeps/l4/hurd/ia32/pt-setup.c (__pthread_setup): Set
EXCEPTION_PAGE->EXCEPTION_HANDLER_SP to the end of
EXCEPTION_PAGE->EXCEPTION_HANDLER_SP minus one word, in which we
save the address of the exception page.
* sysdeps/l4/hurd/pt-thread-start.c (__pthread_thread_start): Set
IN.EXCEPTION_PAGE to the first page in THREAD->EXCEPTION_AREA_VA.
* sysdeps/l4/hurd/pt-thread-halt.c: Include <hurd/mutex.h>,
<hurd/as.h> and <hurd/addr.h>.
(saved_object_lock): New variable.
(__pthread_thread_halt): Lock SAVED_OBJECT_LOCK when accessing
SAVED_OBJECT. Free the address space used by the exception
area (THREAD->EXCEPTION_AREA_VA) and its associated
storage (THREAD->EXCEPTION_AREA).
hurd/
2008-05-29 Neal H. Walfield <neal@gnu.org>
* exceptions.h: Include <hurd/stddef.h>.
[ASM]: Only define relevant macros.
(EXCEPTION_STACK_SIZE_LOG2): Define.
(EXCEPTION_STACK_SIZE): Define.
* stddef.h [ASM]: Only define relevant macros.
(PAGESIZE): Don't append C type specifier.
(PAGESIZE_LOG2): Likewise.
viengoos/
2008-05-29 Neal H. Walfield <neal@gnu.org>
* as.c: Include <hurd/exceptions.h>.
(ensure_stack): Change SPACE to be EXCEPTION_STACK_SIZE - PAGESIZE
bytes large. Write to each page.
* cap-lookup.c: Include <hurd/exceptions.h>.
(ensure_stack): Change SPACE to be EXCEPTION_STACK_SIZE - PAGESIZE
bytes large. Write to each page.
* zalloc.c (ZONE_SIZE): Add suffix the 1 with a U type qualifier.
(ZONES): Include one less zone.
|
|
* pthread/pt-internal.h (__pthread_queue_iterate): Before
returning the current element, save its next pointer.
(__pthread_dequeuing_iterate): Likewise.
* sysdeps/l4/hurd/pt-wakeup.c (__pthread_wakeup): Loop until we
successfully wake THREAD.
|
|
* sysdeps/l4/hurd/bits/pthread-np.h: New file.
* headers.m4: Don't link include/bits/pthread-np.h to
libpthread/sysdeps/l4/bits/pthread-np.h but to
libpthread/sysdeps/l4/hurd/bits/pthread-np.h.
* include/pthread/pthread.h: Include <bits/pthread-np.h>.
* sysdeps/l4/hurd/pt-setactivity-np.c (pthread_setactivity_np):
New file.
* Makefile.am (libpthread_a_SOURCES): Add pt-setactivity-np.c.
|
|
* sysdeps/l4/hurd/pt-kill.c: Just include "../generic/pt-kill.c".
|
|
Add signal implementation.
* Makefile.am (SYSDEP_PATH): Add $(srcdir)/signal.
(libpthread_a_SOURCES): Add pt-mutex-transfer-np.c, kill.c,
killpg.c, pt-kill-siginfo-np.c, raise.c, sigaction.c, sigaddset.c,
sigaltstack.c, sigdelset.c, sigemptyset.c, sigfillset.c,
sig-internal.c, sig-internal.h, siginterrupt.c, sigismember.c,
signal.c, signal-dispatch.c, signal.h, sigpending.c,
sigprocmask.c, sigsuspend.c, sigtimedwait.c, sigwait.c,
sigwaiter.c, sigwaitinfo.c, signal-dispatch-lowlevel.c, and
sigprocmask.c.
* headers.m4: Link libpthread/signal/signal.h into ../include.
* sysdeps/generic/pt-mutex-transfer-np.c: New file.
* signal/README: New file.
* signal/TODO: Likewise.
* signal/kill.c: Likewise.
* signal/pt-kill-siginfo-np.c: Likewise.
* signal/sig-internal.c: Likewise.
* signal/sig-internal.h: Likewise.
* signal/sigaction.c: Likewise.
* signal/sigaltstack.c: Likewise.
* signal/signal-dispatch.c: Likewise.
* signal/signal.h: Likewise.
* signal/sigpending.c: Likewise.
* signal/sigsuspend.c: Likewise.
* signal/sigtimedwait.c: Likewise.
* signal/sigwaiter.c: Likewise.
* signal/sigwaitinfo.c: Likewise.
* sysdeps/l4/hurd/sig-sysdep.h: Likewise.
* sysdeps/l4/hurd/sigprocmask.c: Likewise.
* sysdeps/generic/killpg.c: Likewise.
* sysdeps/generic/pt-kill.c: Likewise.
* sysdeps/generic/raise.c: Likewise.
* sysdeps/generic/sigaddset.c: Likewise.
* sysdeps/generic/sigdelset.c: Likewise.
* sysdeps/generic/sigemptyset.c: Likewise.
* sysdeps/generic/sigfillset.c: Likewise.
* sysdeps/generic/siginterrupt.c: Likewise.
* sysdeps/generic/sigismember.c: Likewise.
* sysdeps/generic/signal.c: Likewise.
* sysdeps/generic/sigwait.c: Likewise.
* sysdeps/l4/hurd/ia32/signal-dispatch-lowlevel.c: Likewise.
* sysdeps/l4/hurd/pt-sysdep.c (sigprocmask): Remove function.
* sysdeps/l4/hurd/pt-sigstate.c (__pthread_sigstate): Implement
it.
* sysdeps/l4/hurd/pt-sigstate-init.c: Include <sig-internal.h>.
(__pthread_sigstate_init): Initialize THREAD->SS.
* sysdeps/l4/hurd/pt-kill.c: Remove file.
* pthread/pt-internal.h: Include <sig-internal.h>.
(PTHREAD_SIGNAL_MEMBERS) [! PTHREAD_SIGNAL_MEMBERS]: Define.
(struct __pthread): Add PTHREAD_SIGNAL_MEMBERS.
* pthread/pt-self.c (pthread_self): Assert that SELF is not NULL.
|
|
* sysdeps/l4/hurd/ia32/pt-setup.c (stack_setup): Add correct casts
to elide gcc warnings.
(__pthread_setup): Likewise.
|
|
2008-02-13 Neal H. Walfield <neal@gnu.org>
* storage.h (storage_alloc): Take additional parameter policy.
Update callers.
* storage.c (storage_alloc): Take additional parameter policy.
Use it when allocating the object and updating the shadow
capability slots.
libpthread/
2008-02-13 Neal H. Walfield <neal@gnu.org>
* sysdeps/l4/hurd/pt-thread-alloc.c (__pthread_thread_alloc):
Update use of storage_alloc to be consistent with new API.
newlib/
2008-02-13 Neal H. Walfield <neal@gnu.org>
* addon/newlib/libc/sys/hurd/getreent.c (slab_alloc): Update use
of storage_alloc to be consistent with new API.
ruth/
2008-02-13 Neal H. Walfield <neal@gnu.org>
* ruth.c (main): Update use of storage_alloc to be consistent with
new API.
|
|
2008-02-13 Neal H. Walfield <neal@gnu.org>
* sysdeps/l4/hurd/pt-sysdep.c (_pthread_init_routine): Change
function signature to take a function pointer and an argument and
to not return.
(init_routine): Likewise. Pass entry and argument to
__pthread_create_internal. Instead of returning, jump to the
program counter and switch stacks.
libc-parts/
2008-02-13 Neal H. Walfield <neal@gnu.org>
* ia32-cmain.c (cmain): Update user of _pthread_init_routine to
reflect API change.
|
|
* sysdeps/l4/hurd/ia32/pt-setup.c (_pthread_entry_point): New
assembly function.
(stack_setup): Take additional argument entry_point. Push it on
the stack.
(__pthread_setup): Set thread->mcontext.pc to
&_pthread_entry_point. Pass ENTRY_POINT to stack_setup.
|
|
2008-02-08 Neal H. Walfield <neal@gnu.org>
* ihash.h: Include <bits/wordsize.h>.
(hurd_ihash_key64_t): New definition.
(struct _hurd_ihash_item64): New structure.
(struct hurd_ihash): Change items's type void *.
[__WORDSIZE == 32]: Add field large.
(_HURD_IHASH_LARGE): New macro.
(HURD_IHASH_INITIALIZER): Take additional argument large. Use it.
(hurd_ihash_init): Take additional argument large.
(hurd_ihash_buffer_size): Likewise.
(hurd_ihash_init_with_buffer): Likewise.
(hurd_ihash_create): Likewise.
(hurd_ihash_replace): Change key's type to hurd_ihash_key64_t.
(hurd_ihash_add): Likewise.
(hurd_ihash_find): Likewise.
(hurd_ihash_remove): Likewise.
(HURD_IHASH_ITERATE): Rewrite to properly handle both 32- and
64-bit keys.
* ihash.c (ITEM): New macro.
(VALUE): Likewise.
(KEY): Likewise.
(ITEM_SIZE): Likewise.
(index_empty): Use the above macros rather than accessing
HT->ITEMS directly.
(index_valid): Likewise and change key's type to a
hurd_ihash_key64_t.
(find_index): Likewise.
(replace_one): Likewise.
(hurd_ihash_replace): Likewise.
(hurd_ihash_find): Likewise.
(hurd_ihash_remove): Likewise.
(hurd_ihash_init_internal): Take additional argument large. Use
it.
(hurd_ihash_init): Likewise.
(hurd_ihash_init_with_buffer): Likewise.
(hurd_ihash_create): Likewise.
(hurd_ihash_buffer_size): Likewise.
* t-ihash.c: Include <assert.h>.
(main): Expect that TEST_LARGE is defined. Use it when calling
hurd_ihash_init. If true, add some tests with 64-bit keys.
* Makefile.am (TESTS): Add t-ihash64.
(check_PROGRAMS): Likewise.
(t_ihash_CPPFLAGS): Add -DTEST_LARGE=false.
(t_ihash64_SOURCES): New variable.
(t_ihash64_CPPFLAGS): Likewise.
viengoos/
2008-02-08 Neal H. Walfield <neal@gnu.org>
* thread.c (thread_init): Update use of
hurd_ihash_init_with_buffer to be consistent with new API.
* object.c (object_init): Likewise.
libpthread/
2008-02-08 Neal H. Walfield <neal@gnu.org>
* sysdeps/hurd/pt-setspecific.c (pthread_setspecific): Update use
of hurd_ihash_create to be consistent with API changes.
|
|
* sysdeps/l4/hurd/pt-block.c: New file.
* sysdeps/l4/hurd/pt-wakeup.c: Likewise.
|
|
* 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.
|
|
* 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-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.
|
|
* 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-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.
|
|
* 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.
|
|
* 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.
|
|
* 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.
|
|
Also merge semaphore changes from mainline Hurd.
|