Page MenuHomeFreeBSD

D47350.id145708.diff
No OneTemporary

D47350.id145708.diff

diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map
--- a/lib/libc/gen/Symbol.map
+++ b/lib/libc/gen/Symbol.map
@@ -456,6 +456,8 @@
aio_read2;
aio_write2;
execvpe;
+ pthread_suspend_all_np;
+ pthread_resume_all_np;
};
FBSDprivate_1.0 {
diff --git a/lib/libc/gen/_pthread_stubs.c b/lib/libc/gen/_pthread_stubs.c
--- a/lib/libc/gen/_pthread_stubs.c
+++ b/lib/libc/gen/_pthread_stubs.c
@@ -132,6 +132,8 @@
[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_null)},
+ [PJT_RESUME_ALL_NP] = {PJT_DUAL_ENTRY(stub_null)},
};
/*
@@ -291,6 +293,8 @@
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)
diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h
--- a/lib/libc/include/libc_private.h
+++ b/lib/libc/include/libc_private.h
@@ -187,6 +187,8 @@
PJT_GETTHREADID_NP,
PJT_ATTR_GET_NP,
PJT_GETNAME_NP,
+ PJT_SUSPEND_ALL_NP,
+ PJT_RESUME_ALL_NP,
PJT_MAX
} pjt_index_t;
diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c
--- a/lib/libthr/thread/thr_init.c
+++ b/lib/libthr/thread/thr_init.c
@@ -271,6 +271,8 @@
[PJT_GETTHREADID_NP] = {DUAL_ENTRY(_thr_getthreadid_np)},
[PJT_ATTR_GET_NP] = {DUAL_ENTRY(_thr_attr_get_np)},
[PJT_GETNAME_NP] = {DUAL_ENTRY(_thr_getname_np)},
+ [PJT_SUSPEND_ALL_NP] = {DUAL_ENTRY(_thr_suspend_all_np)},
+ [PJT_RESUME_ALL_NP] = {DUAL_ENTRY(_thr_resume_all_np)},
};
static int init_once = 0;
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h
--- a/lib/libthr/thread/thr_private.h
+++ b/lib/libthr/thread/thr_private.h
@@ -840,6 +840,8 @@
void _thr_signal_postfork_child(void) __hidden;
void _thr_suspend_all_lock(struct pthread *) __hidden;
void _thr_suspend_all_unlock(struct pthread *) __hidden;
+void _thr_suspend_all_np(void) __hidden;
+void _thr_resume_all_np(void) __hidden;
void _thr_try_gc(struct pthread *, struct pthread *) __hidden;
int _rtp_to_schedparam(const struct rtprio *rtp, int *policy,
struct sched_param *param) __hidden;
diff --git a/lib/libthr/thread/thr_resume_np.c b/lib/libthr/thread/thr_resume_np.c
--- a/lib/libthr/thread/thr_resume_np.c
+++ b/lib/libthr/thread/thr_resume_np.c
@@ -38,7 +38,8 @@
#include "thr_private.h"
__weak_reference(_pthread_resume_np, pthread_resume_np);
-__weak_reference(_pthread_resume_all_np, pthread_resume_all_np);
+__weak_reference(_thr_resume_all_np, pthread_resume_all_np);
+__weak_reference(_thr_resume_all_np, _pthread_resume_all_np);
static void resume_common(struct pthread *thread);
@@ -59,7 +60,7 @@
}
void
-_pthread_resume_all_np(void)
+_thr_resume_all_np(void)
{
struct pthread *curthread = _get_curthread();
struct pthread *thread;
diff --git a/lib/libthr/thread/thr_suspend_np.c b/lib/libthr/thread/thr_suspend_np.c
--- a/lib/libthr/thread/thr_suspend_np.c
+++ b/lib/libthr/thread/thr_suspend_np.c
@@ -41,7 +41,8 @@
int);
__weak_reference(_pthread_suspend_np, pthread_suspend_np);
-__weak_reference(_pthread_suspend_all_np, pthread_suspend_all_np);
+__weak_reference(_thr_suspend_all_np, pthread_suspend_all_np);
+__weak_reference(_thr_suspend_all_np, _pthread_suspend_all_np);
/* Suspend a thread: */
int
@@ -101,7 +102,7 @@
}
void
-_pthread_suspend_all_np(void)
+_thr_suspend_all_np(void)
{
struct pthread *curthread = _get_curthread();
struct pthread *thread;

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 24, 4:21 PM (14 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17762291
Default Alt Text
D47350.id145708.diff (3 KB)

Event Timeline