Changeset 19896 in vbox
- Timestamp:
- May 21, 2009 9:35:42 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 47591
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/once.h
r10940 r19896 92 92 RTDECL(int) RTOnce(PRTONCE pOnce, PFNRTONCE pfnOnce, void *pvUser1, void *pvUser2); 93 93 94 /** 95 * Resets an execute once variable. 96 * 97 * The caller is responsible for making sure there are no concurrent accesses to 98 * the execute once variable. 99 * 100 * @param pOnce Pointer to the execute once variable. 101 */ 102 RTDECL(void) RTOnceReset(PRTONCE pOnce); 103 94 104 /** @} */ 95 105 -
trunk/src/VBox/Runtime/common/misc/once.cpp
r10940 r19896 160 160 } 161 161 162 163 RTDECL(void) RTOnceReset(PRTONCE pOnce) 164 { 165 /* Cannot be done while busy! */ 166 AssertPtr(pOnce); 167 Assert(pOnce->hEventMulti == NIL_RTSEMEVENTMULTI); 168 Assert(pOnce->iState != 1); 169 170 /* Do the same as RTONCE_INITIALIZER does. */ 171 ASMAtomicWriteS32(&pOnce->rc, VERR_INTERNAL_ERROR); 172 ASMAtomicWriteS32(&pOnce->iState, -1); 173 } 174
Note:
See TracChangeset
for help on using the changeset viewer.