Small modification to my prev change:
1) set aborting flags for all signals because tsleep exited not by timeout and not by wakeup. 2) Simplify expression.
This commit is contained in:
parent
158a4a24fa
commit
5ce1b6a98e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13462
@ -189,13 +189,11 @@ struct snd_wait {
|
||||
f.mode = WK_SLEEP; \
|
||||
flag=tsleep(&q, (PRIBIO-5)|PCATCH, "sndint", time_limit); \
|
||||
f.mode &= ~WK_SLEEP; \
|
||||
if (flag == EINTR) \
|
||||
f.aborting = 1; \
|
||||
else { \
|
||||
f.aborting = 0; \
|
||||
if (flag == EWOULDBLOCK) \
|
||||
if (flag == EWOULDBLOCK) { \
|
||||
f.mode |= WK_TIMEOUT; \
|
||||
} \
|
||||
f.aborting = 0; \
|
||||
} else \
|
||||
f.aborting = flag; \
|
||||
}
|
||||
/* An the following wakes up a process */
|
||||
#define WAKE_UP(q, f) wakeup(&q)
|
||||
|
Loading…
Reference in New Issue
Block a user