aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/gen/_pthread_stubs.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/_pthread_stubs.c')
-rw-r--r--lib/libc/gen/_pthread_stubs.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/libc/gen/_pthread_stubs.c b/lib/libc/gen/_pthread_stubs.c
index 34e420ec11f5..d867ee4db51e 100644
--- a/lib/libc/gen/_pthread_stubs.c
+++ b/lib/libc/gen/_pthread_stubs.c
@@ -26,7 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include <signal.h>
#include <pthread.h>
#include <stdlib.h>
@@ -51,6 +50,7 @@ struct pthread {
static struct pthread main_thread;
static int stub_main(void);
+static void stub_void(void);
static void *stub_null(void);
static struct pthread *stub_self(void);
static int stub_zero(void);
@@ -63,6 +63,7 @@ static int stub_getname_np(pthread_t, char *, size_t);
#define PJT_DUAL_ENTRY(entry) \
(pthread_func_t)entry, (pthread_func_t)entry
+__attribute__((visibility("protected")))
pthread_func_entry_t __thr_jtable[PJT_MAX] = {
[PJT_ATFORK] = {PJT_DUAL_ENTRY(stub_zero)},
[PJT_ATTR_DESTROY] = {PJT_DUAL_ENTRY(stub_zero)},
@@ -133,6 +134,8 @@ pthread_func_entry_t __thr_jtable[PJT_MAX] = {
[PJT_GETTHREADID_NP] = {PJT_DUAL_ENTRY(stub_zero)},
[PJT_ATTR_GET_NP] = {PJT_DUAL_ENTRY(stub_esrch)},
[PJT_GETNAME_NP] = {PJT_DUAL_ENTRY(stub_getname_np)},
+ [PJT_SUSPEND_ALL_NP] = {PJT_DUAL_ENTRY(stub_void)},
+ [PJT_RESUME_ALL_NP] = {PJT_DUAL_ENTRY(stub_void)},
};
/*
@@ -292,6 +295,8 @@ STUB_FUNC1(_pthread_cancel_enter, PJT_CANCEL_ENTER, void, int)
STUB_FUNC1(_pthread_cancel_leave, PJT_CANCEL_LEAVE, void, int)
STUB_FUNC2(pthread_attr_get_np, PJT_ATTR_GET_NP, int, pthread_t, pthread_attr_t *)
STUB_FUNC3(pthread_getname_np, PJT_GETNAME_NP, int, pthread_t, char *, size_t)
+STUB_FUNC(pthread_suspend_all_np, PJT_SUSPEND_ALL_NP, void);
+STUB_FUNC(pthread_resume_all_np, PJT_RESUME_ALL_NP, void);
static int
stub_zero(void)
@@ -299,6 +304,12 @@ stub_zero(void)
return (0);
}
+static void
+stub_void(void)
+{
+
+}
+
static void *
stub_null(void)
{