Changeset 43879 in vbox for trunk/src/VBox/Runtime/testcase
- Timestamp:
- Nov 15, 2012 2:49:23 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 82091
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstOnce.cpp
r38636 r43879 49 49 50 50 51 static DECLCALLBACK(int) Once1CB(void *pvUser 1, void *pvUser2)51 static DECLCALLBACK(int) Once1CB(void *pvUser) 52 52 { 53 53 if (g_fOnceCB1) 54 54 return VERR_WRONG_ORDER; 55 if (pvUser 1 != (void *)1 || pvUser2 != (void *)42)55 if (pvUser != (void *)1) 56 56 { 57 RTPrintf("tstOnce: ERROR - Once1CB: pvUser 1=%p pvUser2=%p!\n", pvUser1, pvUser2);57 RTPrintf("tstOnce: ERROR - Once1CB: pvUser=%p!\n", pvUser); 58 58 g_cErrors++; 59 59 return VERR_INVALID_PARAMETER; … … 63 63 64 64 65 static DECLCALLBACK(int) Once2CB(void *pvUser 1, void *pvUser2)65 static DECLCALLBACK(int) Once2CB(void *pvUser) 66 66 { 67 67 if (ASMAtomicIncU32(&g_cOnce2CB) != 1) … … 71 71 return VERR_WRONG_ORDER; 72 72 } 73 if (pvUser 1 != (void *)42 || pvUser2 != (void *)1)73 if (pvUser != (void *)42) 74 74 { 75 RTPrintf("tstOnce: ERROR - Once2CB: pvUser 1=%p pvUser2=%p!\n", pvUser1, pvUser2);75 RTPrintf("tstOnce: ERROR - Once2CB: pvUser=%p!\n", pvUser); 76 76 g_cErrors++; 77 77 return VERR_INVALID_PARAMETER; … … 90 90 if (RT_FAILURE(rc)) 91 91 return rc; 92 rc = RTOnce(&g_Once2, Once2CB, (void *)42 , (void *)1);92 rc = RTOnce(&g_Once2, Once2CB, (void *)42); 93 93 if (RT_SUCCESS(rc)) 94 94 { … … 113 113 RTONCE Once1 = RTONCE_INITIALIZER; 114 114 g_fOnceCB1 = false; 115 int rc = RTOnce(&Once1, Once1CB, (void *)1 , (void *)42);115 int rc = RTOnce(&Once1, Once1CB, (void *)1); 116 116 if (rc != VINF_SUCCESS) 117 117 RTPrintf("tstOnce: ERROR - Once1, 1 failed, rc=%Rrc\n", rc); 118 118 g_fOnceCB1 = false; 119 rc = RTOnce(&Once1, Once1CB, (void *)1 , (void *)42);119 rc = RTOnce(&Once1, Once1CB, (void *)1); 120 120 if (rc != VINF_SUCCESS) 121 121 RTPrintf("tstOnce: ERROR - Once1, 2 failed, rc=%Rrc\n", rc);
Note:
See TracChangeset
for help on using the changeset viewer.