mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
libthr: add stable user interface for sigfastblock(2)
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D50377
This commit is contained in:
parent
c0fdd2bf94
commit
31760ee65a
3 changed files with 23 additions and 0 deletions
|
|
@ -59,6 +59,8 @@ int pthread_resume_np(pthread_t);
|
|||
int pthread_peekjoin_np(pthread_t, void **);
|
||||
void pthread_set_name_np(pthread_t, const char *);
|
||||
int pthread_setaffinity_np(pthread_t, size_t, const cpuset_t *);
|
||||
void pthread_signals_block_np(void);
|
||||
void pthread_signals_unblock_np(void);
|
||||
int pthread_single_np(void);
|
||||
void pthread_suspend_all_np(void);
|
||||
int pthread_suspend_np(pthread_t);
|
||||
|
|
|
|||
|
|
@ -339,5 +339,7 @@ FBSD_1.6 {
|
|||
};
|
||||
|
||||
FBSD_1.8 {
|
||||
pthread_signals_block_np;
|
||||
pthread_signals_unblock_np;
|
||||
pthread_sigqueue;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
#include <pthread_np.h>
|
||||
#include "un-namespace.h"
|
||||
#include "libc_private.h"
|
||||
|
||||
|
|
@ -163,6 +164,24 @@ _thr_signal_block_setup(struct pthread *curthread)
|
|||
__sys_sigfastblock(SIGFASTBLOCK_SETPTR, &curthread->fsigblock);
|
||||
}
|
||||
|
||||
void
|
||||
pthread_signals_block_np(void)
|
||||
{
|
||||
struct pthread *curthread;
|
||||
|
||||
curthread = _get_curthread();
|
||||
_thr_signal_block(curthread);
|
||||
}
|
||||
|
||||
void
|
||||
pthread_signals_unblock_np(void)
|
||||
{
|
||||
struct pthread *curthread;
|
||||
|
||||
curthread = _get_curthread();
|
||||
_thr_signal_unblock(curthread);
|
||||
}
|
||||
|
||||
int
|
||||
_thr_send_sig(struct pthread *thread, int sig)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue