Changeset 25168 in vbox for trunk/include/iprt/critsect.h
- Timestamp:
- Dec 3, 2009 2:59:20 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 55597
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/critsect.h
r25167 r25168 4 4 5 5 /* 6 * Copyright (C) 2006-200 7Sun Microsystems, Inc.6 * Copyright (C) 2006-2009 Sun Microsystems, Inc. 7 7 * 8 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 42 42 /** @defgroup grp_rt_critsect RTCritSect - Critical Sections 43 43 * 44 * A "critical section" synchronization primitive. This can be used to 45 * protect a section of code or data to which access must be exclusive. 46 * Only one thread can hold access to a critical section at one time. 47 * 48 * A critical section is a fast write lock; if the critical section is 49 * not acquired, then entering it is fast (requires no system call). 44 * "Critical section" synchronization primitives can be used to 45 * protect a section of code or data to which access must be exclusive; 46 * only one thread can hold access to a critical section at one time. 47 * 48 * A critical section is a fast recursive write lock; if the critical 49 * section is not acquired, then entering it is fast (requires no system 50 * call). IPRT uses the Windows terminology here; on other platform, this 51 * might be called a "futex" or a "fast mutex". As opposed to IPRT 52 * "fast mutexes" (see @ref grp_rt_sems_fast_mutex ), critical sections 53 * are recursive. 50 54 * 51 55 * Use RTCritSectInit to initialize a critical section; use RTCritSectEnter 52 * and RTCritSectLeave to acquire and release access. IPRT uses the Windows 53 * terminology here; on other platform, this might be called a "futex" or a 54 * "fast mutex". 55 * 56 * If you need a read/write semaphore which allows multiple readers 57 * but only writer, use RTSEMRW instead. 56 * and RTCritSectLeave to acquire and release access. 57 * 58 * For an overview of all types of synchronization primitives provided 59 * by IPRT (event, mutex/fast mutex/read-write mutex semaphores), see 60 * @ref grp_rt_sems . 58 61 * 59 62 * @ingroup grp_rt
Note:
See TracChangeset
for help on using the changeset viewer.