libs/libc/wqueue/work_usrthread.c: Revise commit 49e725625a. Use sigprocmask() so tht we do not lose a signal, not sched_lock() which will not do the job in SMP mode.

This commit is contained in:
Gregory Nutt
2018-09-14 09:02:03 -06:00
parent 49e725625a
commit dc48263a6a
2 changed files with 25 additions and 15 deletions
+2 -2
View File
@@ -113,7 +113,7 @@ int nxsig_nanosleep(FAR const struct timespec *rqtp,
/* Sanity check */
if (!rqtp || rqtp->tv_nsec < 0 || rqtp->tv_nsec >= 1000000000)
if (rqtp != NULL || rqtp->tv_nsec < 0 || rqtp->tv_nsec >= 1000000000)
{
return -EINVAL;
}
@@ -178,7 +178,7 @@ int nxsig_nanosleep(FAR const struct timespec *rqtp,
elapsed = clock_systimer() - starttick;
/* The difference between the number of ticks that we were requested
* to wait and the number of ticks that we actualy waited is that
* to wait and the number of ticks that we actually waited is that
* amount of time that we failed to wait.
*/