* sysv_msg.cc: Add fix from upstream version 1.65.
(msgsnd): Call msleep with timeout value. Handle EWOULDBLOCK. Make sure it's clear from where msleep has been called in debug output. (msgrcv): Make sure it's clear from where msleep has been called in debug output.
This commit is contained in:
parent
7aefc1596d
commit
cce741c409
|
@ -1,3 +1,11 @@
|
|||
2008-04-30 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* sysv_msg.cc: Add fix from upstream version 1.65.
|
||||
(msgsnd): Call msleep with timeout value. Handle EWOULDBLOCK. Make
|
||||
sure it's clear from where msleep has been called in debug output.
|
||||
(msgrcv): Make sure it's clear from where msleep has been called in
|
||||
debug output.
|
||||
|
||||
2008-02-06 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* bsd_helper.cc: Replace %E __small_printf format specifier with %lu
|
||||
|
|
|
@ -722,10 +722,14 @@ msgsnd(struct thread *td, struct msgsnd_args *uap)
|
|||
}
|
||||
DPRINTF(("goodnight\n"));
|
||||
error = msleep(msqptr, &msq_mtx, (PZERO - 4) | PCATCH,
|
||||
"msgwait", 0);
|
||||
"msgsnd", 50);
|
||||
DPRINTF(("good morning, error=%d\n", error));
|
||||
if (we_own_it)
|
||||
msqptr->msg_perm.mode &= ~MSG_LOCKED;
|
||||
if (error == EWOULDBLOCK) {
|
||||
DPRINTF(("timed out\n"));
|
||||
continue;
|
||||
}
|
||||
if (error != 0) {
|
||||
DPRINTF(("msgsnd: interrupted system call\n"));
|
||||
#ifdef __CYGWIN__
|
||||
|
@ -1079,11 +1083,11 @@ msgrcv(struct thread *td, struct msgrcv_args *uap)
|
|||
|
||||
DPRINTF(("msgrcv: goodnight\n"));
|
||||
error = msleep(msqptr, &msq_mtx, (PZERO - 4) | PCATCH,
|
||||
"msgwait", 0);
|
||||
"msgrcv", 0);
|
||||
DPRINTF(("msgrcv: good morning (error=%d)\n", error));
|
||||
|
||||
if (error != 0) {
|
||||
DPRINTF(("msgsnd: interrupted system call\n"));
|
||||
DPRINTF(("msgrcv: interrupted system call\n"));
|
||||
#ifdef __CYGWIN__
|
||||
if (error != EIDRM)
|
||||
#endif /* __CYGWIN__ */
|
||||
|
|
Loading…
Reference in New Issue