diff options
author | Neal H. Walfield <neal@gnu.org> | 2008-01-17 01:12:44 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-04-07 23:12:00 +0200 |
commit | 57e1f67e3757c66023abf912c302bb2a328eaebb (patch) | |
tree | ecf5b84c2cc083b65f2a7b8d40307e7325a8d27f | |
parent | 00905beb9fabe556ae905b5eaa14e8c76dff7d79 (diff) |
2008-01-17 Neal H. Walfield <neal@gnu.org>
* sysdeps/l4/hurd/pt-block.c: New file.
* sysdeps/l4/hurd/pt-wakeup.c: Likewise.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sysdeps/l4/hurd/pt-block.c | 30 | ||||
-rw-r--r-- | sysdeps/l4/hurd/pt-wakeup.c | 32 |
3 files changed, 67 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2008-01-17 Neal H. Walfield <neal@gnu.org> + + * sysdeps/l4/hurd/pt-block.c: New file. + * sysdeps/l4/hurd/pt-wakeup.c: Likewise. + 2008-01-01 Neal H. Walfield <neal@gnu.org> * sysdeps/generic/pt-mutex-timedlock.c diff --git a/sysdeps/l4/hurd/pt-block.c b/sysdeps/l4/hurd/pt-block.c new file mode 100644 index 0000000..2315b1c --- /dev/null +++ b/sysdeps/l4/hurd/pt-block.c @@ -0,0 +1,30 @@ +/* Block a thread. Viengoos version. + Copyright (C) 2008 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 <pt-internal.h> + +#include <hurd/stddef.h> +#include <hurd/futex.h> + +/* Block THREAD. */ +void +__pthread_block (struct __pthread *thread) +{ + futex_wait (&thread->threadid, thread->threadid); +} diff --git a/sysdeps/l4/hurd/pt-wakeup.c b/sysdeps/l4/hurd/pt-wakeup.c new file mode 100644 index 0000000..2225cca --- /dev/null +++ b/sysdeps/l4/hurd/pt-wakeup.c @@ -0,0 +1,32 @@ +/* Wakeup a thread. Viengoos version. + Copyright (C) 2008 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 <pt-internal.h> + +#include <hurd/stddef.h> +#include <hurd/futex.h> +#include <stdint.h> + +/* Wakeup THREAD. */ +void +__pthread_wakeup (struct __pthread *thread) +{ + long ret = futex_wake (&thread->threadid, INT_MAX); + assert (ret == 1); +} |