summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/strtoul.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2008-02-06 00:37:14 +0000
committerattilio <attilio@FreeBSD.org>2008-02-06 00:37:14 +0000
commit6234a717977180bfda1283c7531271c86ca9724f (patch)
tree15fd1c4fe47b14a3d807858af469ca052f50fb66 /lib/libc/stdlib/strtoul.c
parentacc2f89a7fb9267906b61ccf186132ea33aa2eda (diff)
downloadFreeBSD-src-6234a717977180bfda1283c7531271c86ca9724f.zip
FreeBSD-src-6234a717977180bfda1283c7531271c86ca9724f.tar.gz
Add WITNESS support to lockmgr locking primitive.
This support tries to be as parallel as possible with other locking primitives, but there are differences; more specifically: - The base witness support is alredy equipped for allowing lock duplication acquisition as lockmgr rely on this. - In the case of lockmgr_disown() the lock result unlocked by witness even if it is still held by the "kernel context" - In the case of upgrading we can have 3 different situations: * Total unlocking of the shared lock and nothing else * Real witness upgrade if the owner is the first upgrader * Shared unlocking and exclusive locking if the owner is not the first upgrade but it is still allowed to upgrade - LK_DRAIN is basically handled like an exclusive acquisition Additively new options LK_NODUP and LK_NOWITNESS can now be used with lockinit(): LK_NOWITNESS disables WITNESS for the specified lock while LK_NODUP enable duplicated locks tracking. This will require manpages update and a __FreeBSD_version bumping (addressed by further commits). This patch also fixes a problem occurring if a lockmgr is held in exclusive mode and the same owner try to acquire it in shared mode: currently there is a spourious shared locking acquisition while what we really want is a lock downgrade. Probabilly, this situation can be better served with a EDEADLK failing errno return. Side note: first testing on this patch alredy reveleated several LORs reported, so please expect LORs cascades until resolved. NTFS also is reported broken by WITNESS introduction. BTW, NTFS is exposing a lock leak which needs to be fixed, and this patch can help it out if rightly tweaked. Tested by: kris, yar, Scot Hetzel <swhetzel at gmail dot com>
Diffstat (limited to 'lib/libc/stdlib/strtoul.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud