Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Mar 2009 10:40:07 GMT
From:      Bruce Simpson <bms@incunabulum.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/127545: [sysvipc] POSIX (1003.1b) semaphores can become negative
Message-ID:  <200903121040.n2CAe7SA029215@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/127545; it has been noted by GNATS.

From: Bruce Simpson <bms@incunabulum.net>
To: freebsd-gnats-submit@freebsd.org, 
 Philip Semanchuk <philip@semanchuk.com>
Cc:  
Subject: Re: kern/127545: [sysvipc] POSIX (1003.1b) semaphores can become
 negative
Date: Thu, 12 Mar 2009 10:38:38 +0000

 This is a multi-part message in MIME format.
 --------------070200030208040807070007
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Can you please try this patch?
 
 thanks,
 BMS
 
 --------------070200030208040807070007
 Content-Type: text/plain;
  name="1"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="1"
 
 Index: uipc_sem.c
 ===================================================================
 --- uipc_sem.c	(revision 189736)
 +++ uipc_sem.c	(working copy)
 @@ -722,7 +722,7 @@
  #endif
  	DP(("kern_sem_wait value = %d, tryflag %d\n", ks->ks_value, tryflag));
  	vfs_timestamp(&ks->ks_atime);
 -	if (ks->ks_value == 0) {
 +	while (ks->ks_value == 0) {
  		ks->ks_waiters++;
  		if (tryflag != 0)
  			error = EAGAIN;
 
 --------------070200030208040807070007--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903121040.n2CAe7SA029215>