Changeset 25612 in vbox for trunk/src/VBox/Runtime/generic
- Timestamp:
- Dec 31, 2009 3:06:05 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56303
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/generic/semrw-generic.cpp
r25522 r25612 39 39 #include "internal/iprt.h" 40 40 41 #include <iprt/critsect.h>42 #include <iprt/alloc.h>43 #include <iprt/time.h>44 41 #include <iprt/asm.h> 45 42 #include <iprt/assert.h> 43 #include <iprt/critsect.h> 44 #include <iprt/err.h> 45 #include <iprt/lockvalidator.h> 46 #include <iprt/mem.h> 47 #include <iprt/time.h> 46 48 #include <iprt/thread.h> 47 #include <iprt/err.h>48 #include <iprt/stream.h>49 49 50 50 #include "internal/magics.h" 51 #include "internal/strict.h" 51 52 52 53 … … 81 82 /** Need to reset ReadEvent. */ 82 83 bool fNeedResetReadEvent; 84 #ifdef RTSEMRW_STRICT 85 /** The validator record for the writer. */ 86 RTLOCKVALRECEXCL ValidatorWrite; 87 /** The validator record for the readers. */ 88 RTLOCKVALRECSHRD ValidatorRead; 89 #endif 83 90 }; 84 91 … … 121 128 pThis->fNeedResetReadEvent = true; 122 129 pThis->u32Magic = RTSEMRW_MAGIC; 130 #ifdef RTSEMRW_STRICT 131 RTLockValidatorRecExclInit(&pThis->ValidatorWrite, NIL_RTLOCKVALIDATORCLASS, RTLOCKVALIDATOR_SUB_CLASS_NONE, "RTSemRW", pThis); 132 RTLockValidatorRecSharedInit(&pThis->ValidatorRead, NIL_RTLOCKVALIDATORCLASS, RTLOCKVALIDATOR_SUB_CLASS_NONE, "RTSemRW", pThis); 133 RTLockValidatorRecMakeSiblings(&pThis->ValidatorWrite.Core, &pThis->ValidatorRead.Core); 134 #endif 123 135 *pRWSem = pThis; 124 136 return VINF_SUCCESS; … … 181 193 AssertMsgRC(rc, ("RTCritSectDelete failed! rc=%Rrc\n", rc)); 182 194 195 #ifdef RTSEMRW_STRICT 196 RTLockValidatorRecSharedDelete(&pThis->ValidatorRead); 197 RTLockValidatorRecExclDelete(&pThis->ValidatorWrite); 198 #endif 183 199 RTMemFree(pThis); 184 200 rc = VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.