* 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:
		| @@ -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> | 2008-02-06  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  |  | ||||||
| 	* bsd_helper.cc: Replace %E __small_printf format specifier with %lu | 	* 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")); | 			DPRINTF(("goodnight\n")); | ||||||
| 			error = msleep(msqptr, &msq_mtx, (PZERO - 4) | PCATCH, | 			error = msleep(msqptr, &msq_mtx, (PZERO - 4) | PCATCH, | ||||||
| 			    "msgwait", 0); | 			    "msgsnd", 50); | ||||||
| 			DPRINTF(("good morning, error=%d\n", error)); | 			DPRINTF(("good morning, error=%d\n", error)); | ||||||
| 			if (we_own_it) | 			if (we_own_it) | ||||||
| 				msqptr->msg_perm.mode &= ~MSG_LOCKED; | 				msqptr->msg_perm.mode &= ~MSG_LOCKED; | ||||||
|  | 			if (error == EWOULDBLOCK) { | ||||||
|  | 				DPRINTF(("timed out\n")); | ||||||
|  | 				continue; | ||||||
|  | 			} | ||||||
| 			if (error != 0) { | 			if (error != 0) { | ||||||
| 				DPRINTF(("msgsnd:  interrupted system call\n")); | 				DPRINTF(("msgsnd:  interrupted system call\n")); | ||||||
| #ifdef __CYGWIN__ | #ifdef __CYGWIN__ | ||||||
| @@ -1079,11 +1083,11 @@ msgrcv(struct thread *td, struct msgrcv_args *uap) | |||||||
|  |  | ||||||
| 		DPRINTF(("msgrcv:  goodnight\n")); | 		DPRINTF(("msgrcv:  goodnight\n")); | ||||||
| 		error = msleep(msqptr, &msq_mtx, (PZERO - 4) | PCATCH, | 		error = msleep(msqptr, &msq_mtx, (PZERO - 4) | PCATCH, | ||||||
| 		    "msgwait", 0); | 		    "msgrcv", 0); | ||||||
| 		DPRINTF(("msgrcv:  good morning (error=%d)\n", error)); | 		DPRINTF(("msgrcv:  good morning (error=%d)\n", error)); | ||||||
|  |  | ||||||
| 		if (error != 0) { | 		if (error != 0) { | ||||||
| 			DPRINTF(("msgsnd:  interrupted system call\n")); | 			DPRINTF(("msgrcv:  interrupted system call\n")); | ||||||
| #ifdef __CYGWIN__ | #ifdef __CYGWIN__ | ||||||
| 		    if (error != EIDRM) | 		    if (error != EIDRM) | ||||||
| #endif /* __CYGWIN__ */ | #endif /* __CYGWIN__ */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user