Bug 75655

Summary: Re: man page for sx(9) is misleading
Product: Documentation Reporter: Darren Reed <darrenr>
Component: Books & ArticlesAssignee: Giorgos Keramidas <keramida>
Status: Closed FIXED    
Severity: Affects Only Me CC: darrenr
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Darren Reed 2004-12-30 14:10:21 UTC
 On Wed, Dec 29, 2004 at 01:29:17AM +0200, Giorgos Keramidas wrote:
 > On 2004-12-28 13:55, Darren Reed <darrenr@FreeBSD.ORG> wrote:
 > >
 > > According to discussion on freebsd mailing lists, it is not possible
 > > to hold an sx lock when you want a mtx lock.  This should be documented.
 > 
 > As far as I can tell, by looking at kern_sx.c and sys/sx.h, this is
 > because the sx lock initialization uses an mtxpool for the mutex used to
 > serialize access to the internal sx lock data.
 > 
 > Leaf locks may be used in operations that msleep() but there can be only
 > one of them in each lock path and no other lock can be obtained after
 > them.
 > 
 > This is sort of implied by the SEE ALSO reference of mtx_pool(9), but we
 > should probably state it explicitly in CONTEXT.
 
 What you wrote is not right.  You cannot acquire an sx(9) lock while holding
 an mtx(9) lock.
 
 Darren
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2005-01-03 06:01:01 UTC
State Changed
From-To: open->closed

Misfiled followup to docs/75571; content migrated. 


Comment 2 Mark Linimon freebsd_committer freebsd_triage 2005-01-03 06:01:01 UTC
Responsible Changed
From-To: gnats-admin->keramida