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
| | This will allow libpthread to be build as an addon.
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=.
\ No newline at end of file
--
1.9.0
There is no definition for __thread_terminate_release yet, so according to Samuel we disable it.
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
__SPIN_LOCK_INITIALIZER gets defined to zero so we can start using libpthread.
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
|