|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Artur Grabowski (art
cvs.openbsd.org)
Date: Fri May 04 2007 - 07:56:15 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
CVSROOT: /cvs
Module name: src
Changes by: art
cvs.openbsd.org 2007/05/04 06:56:15
Modified files:
sys/sys : rwlock.h
sys/kern : kern_rwlock.c
Log message:
- Rename rw_test_and_set to rw_cas, since most litterature uses the
test_and_set name for some other operation, while cas is generally
used for compare and set (cmpxchg in intel land, cas in sparc land).
- Make rw locks properly MP safe (provided that rw_cas is implemented
in MD code). Most operations were MP safe except the sleep where we
could have set the "I'm sleeping" flag before actually going to sleep
so that the wakeup could miss us. Now, using the split tsleep,
we first setup the sleep (put us on the sleep queues), then set
the flag aborting the sleep if the lock has changed and then finally
go to sleep.
miod
ok (and he's been prodding me for days to get this in)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]