Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Solaris Dynamic Tracing Guide
Previous Next

Reader/Writer Lock Probes

Reader/write locks permit multiple readers or a single writer, but not both, to be in a critical section at one time. These locks are typically used for structures that are searched more frequently than they are modified, or when threads spend substantial time in a critical section. Users interact with reader/writer locks using the Solaris rwlock(3C) or POSIX pthread_rwlock_init(3C) interfaces.

The probes pertaining to readers/writer locks are in Table 31-2. For each probe, arg0 contains a pointer to the rwlock_t or pthread_rwlock_tstructure (these are identical types) that represents the adaptive lock. arg1 contains a boolean value that indicates whether the operation was as a writer.

Table 31-2 Readers/Writer Lock Probes

rw-acquire

Hold event probe that fires immediately after a readers/writer lock is acquired.

rw-block

Contention event probe that fires before a thread blocks while attempting to acquire a lock. If enabled, the rw-acquire probe or the rw-error probe will fire after rw-block.

rw-release

Hold event probe that fires immediately after a reader/writer lock is released

rw-error

Error event probe that fires when an error is encountered during a reader/writer lock operation. arg1 is the errno value of the error encountered.

Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire