On 06-May-01 Seigo Tanimura wrote:
> As conversion of select(2) from msleep(9) to a condition variable is
> in the SMPng TODO list, I have done that task.
> 
> Also, we do not have to lock a process in order to evaluate the result
> of {sel,poll}scan() and the remaining time of {select,poll}(2). It
> should be enough to do those pieces of work first, followed by locking
> a process and wait for a condition variable or selwakeup().

You need the lock when clearing the bit in p_flag.  That is why the proc locks
are there, so all those proc locks need to stay.  When you clear a bit, you are
writing all the bits, so you need to ensure that you can atomically
read/modify/write all the bits in p_flag, hence the need for the proc lock.

Please back out the changes to not lock the process around the p_flag change. 
The rest of the patch looks ok, though I'd like to review the updated version
before it is committed.  Thanks.

> Those changes are in the patch at:
> 
> http://people.FreeBSD.org/~tanimura/patches/selectopt.diff

-- 

John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to