108#define LOS_BIT_SET(val, bit) ((val) = (val) | (1ULL << (UINT32)(bit)))
109#define LOS_BIT_CLR(val, bit) ((val) = (val) & ~(1ULL << (UINT32)(bit)))
110#define LOS_IS_BIT_SET(val, bit) (bool)((((val) >> (UINT32)(bit)) & 1ULL))
112#define SIG_STOP_VISIT 1
114#define OS_KERNEL_KILL_PERMISSION 0U
115#define OS_USER_KILL_PERMISSION 3U
117#define OS_RETURN_IF(expr, errcode) \
122#define OS_RETURN_IF_VOID(expr) \
126#define OS_GOTO_EXIT_IF(expr, errcode) \
131#define OS_GOTO_EXIT_IF_ONLY(expr) \
136#define OS_RETURN_VOID_IF_NULL(pPara) \
137 if (NULL == (pPara)) { \
140#define OS_RETURN_IF_NULL(pPara) \
141 if (NULL == (pPara)) { \
145#define OS_GOTO_EXIT_IF_NULL(pPara) \
146 if (NULL == (pPara)) { \
154#define SIGNO2SET(s) ((sigset_t)1ULL << (s))
155#define NULL_SIGNAL_SET ((sigset_t)0ULL)
156#define FULL_SIGNAL_SET ((sigset_t)~0ULL)
160 return (sig < _NSIG) ? 1 : 0;
163#define MAX_SIG_ARRAY_IN_MUSL 128
166 unsigned long sig[MAX_SIG_ARRAY_IN_MUSL /
sizeof(
unsigned long)];
234#define SIGEV_THREAD_ID 4
238int sys_rt_sigtimedwait(
const sigset_t *mask, siginfo_t *si,
const struct timespec *ts,
size_t sigsetsize);
247int OsKill(pid_t pid,
int sig,
int permission);
248int OsDispatch(pid_t pid, siginfo_t *info,
int permission);
249int OsSigTimedWait(sigset_t *set, siginfo_t *info,
unsigned int timeout);
struct SigInfoListNode SigInfoListNode
int OsPause(void)
通过信号挂起当前任务
int sys_sigpending(sigset_t *)
int OsSigAction(int sig, const sigaction_t *act, sigaction_t *oact)
int OsSigprocMask(int how, const sigset_t_l *set, sigset_t_l *oldset)
VOID OsSigIntUnlock(VOID)
VOID OsClearSigInfoTmpList(sig_cb *sigcb)
void(* sa_sighandler_t)(int)
int OsSigAddSet(sigset_t *, int)
向信号集中加入signo信号
int OsPthreadKill(UINT32 tid, int signo)
发送信号
int sys_rt_sigtimedwait(const sigset_t *mask, siginfo_t *si, const struct timespec *ts, size_t sigsetsize)
int OsSigIsMember(const sigset_t *, int)
判定信号signo是否存在信号集中。如果信号集里已有该信号则返回1,否则返回0。如果有错误则返回-1
int OsDispatch(pid_t pid, siginfo_t *info, int permission)
信号分发,发送信号权限/进程组过滤.
int OsKillLock(pid_t pid, int sig)
给发送信号过程加锁
int OsSigPending(sigset_t *set)
获取阻塞当前任务的信号集
struct sigaction sigaction_t
int sys_sigqueue(pid_t, int, const union sigval)
int OsKill(pid_t pid, int sig, int permission)
int OsSigEmptySet(sigset_t *)
信号集全部清0
int OsSigSuspend(const sigset_t *set)
用参数set代替进程的原有掩码,并暂停进程执行,直到收到信号再恢复原有掩码并继续执行进程。
void(* sa_siginfoaction_t)(int, siginfo_t *, void *)
INT32 OsTaskKillUnsafe(UINT32 taskID, INT32 signo)
int OsSigTimedWait(sigset_t *set, siginfo_t *info, unsigned int timeout)
让当前任务等待的信号
static int GOOD_SIGNO(unsigned int sig)
信号ID是否有效
int sys_sigsuspend(const sigset_t *)
struct SigInfoListNode * next
unsigned int sigIntLock
信号中断锁
sq_queue_t sigactionq
信号捕捉队列
SigInfoListNode * tmpInfoListHead
sigset_t sigprocmask
Signals that are blocked | 任务屏蔽了哪些信号
LOS_DL_LIST waitList
待链表,上面挂的是等待信号到来的任务, 请查找 OsTaskWait(&sigcb->waitList, timeout, TRUE) 理解
sigset_t sigPendFlag
信号阻塞标签集,记录那些信号来过,任务依然阻塞的集合.即:这些信号不能唤醒任务
struct sq_entry_s * flink
ARG_NUM_3 ARG_NUM_1 ARG_NUM_2 ARG_NUM_2 ARG_NUM_3 ARG_NUM_1 ARG_NUM_4 ARG_NUM_2 ARG_NUM_2 ARG_NUM_5 ARG_NUM_2 ARG_NUM_0 ARG_NUM_2 ARG_NUM_1 ARG_NUM_2 ARG_NUM_3 ARG_NUM_7 ARG_NUM_2 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