VirtualBox

Ignore:
Timestamp:
Jan 1, 2010 2:19:06 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56305
Message:

iprt,pdmcritsect: More lock validator refactoring and debugging. Added hooks to semrw-generic.cpp. (Everything is still disabled.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstRTLockValidator.cpp

    r25605 r25614  
    3333*   Header Files                                                               *
    3434*******************************************************************************/
     35#include <iprt/lockvalidator.h>
     36
    3537#include <iprt/asm.h>                   /* for return addresses */
    3638#include <iprt/critsect.h>
    37 #include <iprt/lockvalidator.h>
    38 
    3939#include <iprt/err.h>
    40 #include <iprt/stream.h>
     40#include <iprt/semaphore.h>
     41#include <iprt/test.h>
    4142#include <iprt/thread.h>
    42 #include <iprt/test.h>
    4343
    4444
     
    169169    RTTEST_CHECK_RC_OK_RET(g_hTest, RTCritSectDelete(&CritSect), false);
    170170
    171     /* Add check for the other types as we add more scenarios. */
     171    RTSEMRW hSemRW;
     172    RTTEST_CHECK_RC_OK_RET(g_hTest, RTSemRWCreate(&hSemRW), false);
     173    RTTEST_CHECK_RC_OK_RET(g_hTest, RTSemRWRequestRead(hSemRW, 50), false);
     174    int rc = RTSemRWRequestWrite(hSemRW, 1);
     175    if (rc != VERR_SEM_LV_ILLEGAL_UPGRADE)
     176        fRet = false;
     177    RTTEST_CHECK_RET(g_hTest, RT_FAILURE_NP(rc), false);
     178    RTTEST_CHECK_RC_OK_RET(g_hTest, RTSemRWReleaseRead(hSemRW), false);
     179    RTTEST_CHECK_RC_OK_RET(g_hTest, RTSemRWDestroy(hSemRW), false);
     180
    172181    return fRet;
    173182}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette