summaryrefslogtreecommitdiff
path: root/sysdeps/l4/hurd/pt-sysdep.c
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2007-11-20 18:38:00 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-04-07 23:10:27 +0200
commit96d719679962ea3f765b3e3f23672af130de9c1d (patch)
treeaf75c45cb9241f281c87cad84993ee6eacbd2cb3 /sysdeps/l4/hurd/pt-sysdep.c
parent961d71afd49f55395e6dbfe203d6b968e4105ee0 (diff)
2007-11-20 Neal H. Walfield <neal@gnu.org>
* 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.
Diffstat (limited to 'sysdeps/l4/hurd/pt-sysdep.c')
-rw-r--r--sysdeps/l4/hurd/pt-sysdep.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/sysdeps/l4/hurd/pt-sysdep.c b/sysdeps/l4/hurd/pt-sysdep.c
index 265592ca..a05eb0a5 100644
--- a/sysdeps/l4/hurd/pt-sysdep.c
+++ b/sysdeps/l4/hurd/pt-sysdep.c
@@ -23,6 +23,20 @@
#include <pt-internal.h>
+int
+sched_yield (void)
+{
+ l4_yield ();
+ return 0;
+}
+
+int
+sigprocmask (int HOW, const sigset_t *restrict SET, sigset_t *restrict OLDSET)
+{
+ /* Just ignore for now. */
+ return 0;
+}
+
/* Forward. */
static void *init_routine (void);
@@ -36,23 +50,15 @@ void *(*_pthread_init_routine)(void) = &init_routine;
static void *
init_routine (void)
{
- struct __pthread *thread;
- int err;
-
/* Initialize the library. */
__pthread_initialize ();
+ struct __pthread *thread;
+ int err;
+
/* Create the pthread structure for the main thread (i.e. us). */
err = __pthread_create_internal (&thread, 0, 0, 0);
assert_perror (err);
- __pthread_initialize ();
-
- /* Decrease the number of threads, to take into account that the
- signal thread (which will be created by the startup code when we
- return from here) shouldn't be seen as a user thread. */
-#warning Need to implement the signal thread.
- // __pthread_total--;
-
return (void *) thread->mcontext.sp;
}