diff options
author | Neal H. Walfield <neal@gnu.org> | 2007-11-23 13:47:05 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-04-07 23:10:46 +0200 |
commit | d438eed871f875dcf4676b83c3d3ae62f32f491a (patch) | |
tree | e61d5bfa021e57e153e7d1cd1b1ba4511774a9b0 /sysdeps/l4/hurd/pt-startup.c | |
parent | 96d719679962ea3f765b3e3f23672af130de9c1d (diff) |
2007-11-23 Neal H. Walfield <neal@gnu.org>
* 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.
Diffstat (limited to 'sysdeps/l4/hurd/pt-startup.c')
-rw-r--r-- | sysdeps/l4/hurd/pt-startup.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sysdeps/l4/hurd/pt-startup.c b/sysdeps/l4/hurd/pt-startup.c new file mode 100644 index 00000000..b6461de7 --- /dev/null +++ b/sysdeps/l4/hurd/pt-startup.c @@ -0,0 +1,30 @@ +/* Thread initialization. Hurd/L4 version. + Copyright (C) 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include <l4.h> +#include <pt-internal.h> + +#include <hurd/exceptions.h> + +void +__pthread_startup (void) +{ + struct __pthread *pthread = _pthread_self (); + pthread->threadid = l4_myself (); +} |