diff --git a/sched/signal/sig_kill.c b/sched/signal/sig_kill.c index 3b6d6f09ed4..f62848eedad 100644 --- a/sched/signal/sig_kill.c +++ b/sched/signal/sig_kill.c @@ -79,7 +79,6 @@ int nxsig_kill(pid_t pid, int signo) FAR struct tcb_s *rtcb = this_task(); #endif siginfo_t info; - int ret; /* We do not support sending signals to process groups */ @@ -95,10 +94,6 @@ int nxsig_kill(pid_t pid, int signo) return -EINVAL; } - /* Keep things stationary through the following */ - - sched_lock(); - /* Create the siginfo structure */ info.si_signo = signo; @@ -112,10 +107,7 @@ int nxsig_kill(pid_t pid, int signo) /* Send the signal */ - ret = nxsig_dispatch(pid, &info); - - sched_unlock(); - return ret; + return nxsig_dispatch(pid, &info); } /**************************************************************************** diff --git a/sched/signal/sig_procmask.c b/sched/signal/sig_procmask.c index c8aeac23527..93d74c3c129 100644 --- a/sched/signal/sig_procmask.c +++ b/sched/signal/sig_procmask.c @@ -91,8 +91,6 @@ int nxsig_procmask(int how, FAR const sigset_t *set, FAR sigset_t *oset) irqstate_t flags; int ret = OK; - sched_lock(); - /* Return the old signal mask if requested */ if (oset != NULL) @@ -148,7 +146,6 @@ int nxsig_procmask(int how, FAR const sigset_t *set, FAR sigset_t *oset) nxsig_unmask_pendingsignal(); } - sched_unlock(); return ret; } diff --git a/sched/signal/sig_queue.c b/sched/signal/sig_queue.c index a611f63cc2b..2b5f5556782 100644 --- a/sched/signal/sig_queue.c +++ b/sched/signal/sig_queue.c @@ -80,7 +80,6 @@ int nxsig_queue(int pid, int signo, union sigval value) FAR struct tcb_s *rtcb = this_task(); #endif siginfo_t info; - int ret; sinfo("pid=0x%08x signo=%d value=%d\n", pid, signo, value.sival_int); @@ -105,11 +104,7 @@ int nxsig_queue(int pid, int signo, union sigval value) /* Send the signal */ - sched_lock(); - ret = nxsig_dispatch(pid, &info); - sched_unlock(); - - return ret; + return nxsig_dispatch(pid, &info); } /**************************************************************************** diff --git a/sched/signal/sig_tgkill.c b/sched/signal/sig_tgkill.c index 3f09ca248d4..d1c04d87eda 100644 --- a/sched/signal/sig_tgkill.c +++ b/sched/signal/sig_tgkill.c @@ -89,10 +89,6 @@ int tgkill(pid_t pid, pid_t tid, int signo) goto errout; } - /* Keep things stationary through the following */ - - sched_lock(); - /* Create the siginfo structure */ info.si_signo = signo; @@ -110,7 +106,7 @@ int tgkill(pid_t pid, pid_t tid, int signo) if (!stcb) { ret = -ESRCH; - goto errout_with_lock; + goto errout; } /* Dispatch the signal to thread, bypassing normal task group thread @@ -118,7 +114,6 @@ int tgkill(pid_t pid, pid_t tid, int signo) */ ret = nxsig_tcbdispatch(stcb, &info); - sched_unlock(); if (ret < 0) { @@ -127,8 +122,6 @@ int tgkill(pid_t pid, pid_t tid, int signo) return OK; -errout_with_lock: - sched_unlock(); errout: set_errno(-ret); return ERROR;