1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
| | This patch helps to integrate the Hurd's libpthread as a libc add-on.
It writes the configure file, removes an rpc call not yet
implemented on the version of gnumach we use and defines
a missing macro.
diff --git a/libpthread/configure b/libpthread/configure
new file mode 100644
index 0000000..2cdbc71
--- /dev/null
+++ b/libpthread/configure
@@ -0,0 +1,2 @@
+libc_add_on_canonical=libpthread
+libc_add_on_subdirs=.
--
1.9.0
We are using a version of GNU Mach that lacks 'thread_terminate_release'
(not introduced yet). The 'thread_terminate' RPC call will be enough for
our needs.
See <http://lists.gnu.org/archive/html/bug-hurd/2014-05/msg00127.html>.
diff --git a/libpthread/sysdeps/mach/pt-thread-terminate.c b/libpthread/sysdeps/mach/pt-thread-terminate.c
index 6672065..129a611 100644
--- a/libpthread/sysdeps/mach/pt-thread-terminate.c
+++ b/libpthread/sysdeps/mach/pt-thread-terminate.c
@@ -70,9 +70,9 @@ __pthread_thread_terminate (struct __pthread *thread)
__mach_port_destroy (__mach_task_self (), wakeup_port);
/* Terminate and release all that's left. */
- err = __thread_terminate_release (kernel_thread, mach_task_self (),
- kernel_thread, reply_port,
- stackaddr, stacksize);
+ /* err = __thread_terminate_release (kernel_thread, mach_task_self (), */
+ /* kernel_thread, reply_port, */
+ /* stackaddr, stacksize); */
/* The kernel does not support it yet. Leak but at least terminate
correctly. */
--
1.9.2
The __PTHREAD_SPIN_LOCK_INITIALIZER definition is missing, so we
define it to __SPIN_LOCK_INITIALIZER which already exists.
See <http://lists.gnu.org/archive/html/commit-hurd/2009-04/msg00006.html>.
diff --git a/libpthread/sysdeps/mach/bits/spin-lock.h b/libpthread/sysdeps/mach/bits/spin-lock.h
index 537dac9..fca0e5a 100644
--- a/libpthread/sysdeps/mach/bits/spin-lock.h
+++ b/libpthread/sysdeps/mach/bits/spin-lock.h
@@ -30,7 +30,7 @@ typedef __spin_lock_t __pthread_spinlock_t;
/* Initializer for a spin lock object. */
#ifndef __PTHREAD_SPIN_LOCK_INITIALIZER
-#error __PTHREAD_SPIN_LOCK_INITIALIZER undefined: should be defined by <lock-intern.h>.
+#define __PTHREAD_SPIN_LOCK_INITIALIZER __SPIN_LOCK_INITIALIZER
#endif
__END_DECLS
|