VirtualBox

Changeset 28270 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Apr 13, 2010 6:02:46 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60012
Message:

Main/glue/AutoLock: add a wrapper for checking whether any lock of a class is held

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/AutoLock.cpp

    r25939 r28270  
    55
    66/*
    7  * Copyright (C) 2006-2009 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2010 Sun Microsystems, Inc.
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    115115    AutoWriteLock lock2(critsect2 COMMA_LOCKVAL_SRC_POS);*/
    116116#endif
     117}
     118
     119bool AutoLockHoldsLocksInClass(VBoxLockingClass lockClass)
     120{
     121#ifdef VBOX_WITH_MAIN_LOCK_VALIDATION
     122    return RTLockValidatorHoldsLocksInClass(NIL_RTTHREAD,
     123                                            g_mapLockValidationClasses[lockClass]);
     124#else /* !VBOX_WITH_MAIN_LOCK_VALIDATION */
     125    return false;
     126#endif /* !VBOX_WITH_MAIN_LOCK_VALIDATION */
    117127}
    118128
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