VirtualBox

Changeset 38717 in vbox for trunk/include/VBox/com


Ignore:
Timestamp:
Sep 12, 2011 2:48:50 PM (13 years ago)
Author:
vboxsync
Message:

Main/Medium+Machine+AutoLock: Integrate the queryInfo semaphore into the AutoLock infrastructure with the appropriate lock class. Adjust the locking rules for queryInfo and start propagating them up to the callers. Needs more work, but this is comparably simple: just get the mediaTree lock in the caller if the assert triggers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/com/AutoLock.h

    r30501 r38717  
    55
    66/*
    7  * Copyright (C) 2006-2010 Oracle Corporation
     7 * Copyright (C) 2006-2011 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    7676    LOCKCLASS_LISTOFMEDIA = 7,              // list of media (hard disks, DVDs, floppies) in VirtualBox object
    7777    LOCKCLASS_LISTOFOTHEROBJECTS = 8,       // any other list of objects
    78     LOCKCLASS_OTHEROBJECT = 9,              // any regular object member variable lock
    79     LOCKCLASS_USBLIST = 10,                 // temporary hack to avoid having to clean up the USB filters
     78    LOCKCLASS_MEDIUMQUERY = 9,              // lock used to protect Machine::queryInfo
     79    LOCKCLASS_OTHEROBJECT = 10,             // any regular object member variable lock
     80    LOCKCLASS_USBLIST = 11,                 // temporary hack to avoid having to clean up the USB filters
    8081                                            // too much @todo r=dj get rid of this!
    81     LOCKCLASS_PROGRESSLIST = 11,            // list of progress objects in VirtualBox; no other object lock
     82    LOCKCLASS_PROGRESSLIST = 12,            // list of progress objects in VirtualBox; no other object lock
    8283                                            // may be held after this!
    83     LOCKCLASS_OBJECTSTATE = 12              // object state lock (handled by AutoCaller classes)
     84    LOCKCLASS_OBJECTSTATE = 13              // object state lock (handled by AutoCaller classes)
    8485};
    8586
Note: See TracChangeset for help on using the changeset viewer.

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