VirtualBox

Ignore:
Timestamp:
Apr 28, 2019 4:47:51 PM (6 years ago)
Author:
vboxsync
Message:

Config.kmk,Additions/common/crOpenGL,VBox/GuestHost/OpenGL,HostServices/SharedOpenGL: Remove CHROMIUM_THREADSAFE define and apply the current default

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/util/net.c

    r78190 r78341  
    4848    int                  num_clients; /* total number of clients (unused?) */
    4949
    50 #ifdef CHROMIUM_THREADSAFE
    5150    CRmutex              mutex;
    52 #endif
    5351} cr_net;
    5452
     
    134132    {
    135133        crDebug("crNetConnectToServer() failed, freeing the connection");
    136         #ifdef CHROMIUM_THREADSAFE
    137             crFreeMutex( &conn->messageList.lock );
    138         #endif
     134        crFreeMutex( &conn->messageList.lock );
    139135        conn->Disconnect(conn);
    140136        crFree( conn );
     
    219215{
    220216    conn->Disconnect(conn);
    221     #ifdef CHROMIUM_THREADSAFE
    222         crFreeMutex( &conn->messageList.lock );
    223     #endif
     217    crFreeMutex( &conn->messageList.lock );
    224218    crFree(conn);
    225219}
     
    244238        cr_net.use_hgcm    = 0;
    245239        cr_net.num_clients = 0;
    246 #ifdef CHROMIUM_THREADSAFE
    247240        crInitMutex(&cr_net.mutex);
    248 #endif
    249241
    250242        cr_net.initialized = 1;
     
    305297    if (!cr_net.initialized) return;
    306298
    307 #ifdef CHROMIUM_THREADSAFE
    308299    crLockMutex(&cr_net.mutex);
    309 #endif
    310300
    311301    /* Note, other protocols used by chromium should free up stuff too,
     
    329319    cr_net.initialized = 0;
    330320
    331 #ifdef CHROMIUM_THREADSAFE
    332321    crUnlockMutex(&cr_net.mutex);
    333322    crFreeMutex(&cr_net.mutex);
    334 #endif
    335323}
    336324
     
    380368    list->head = list->tail = NULL;
    381369    list->numMessages = 0;
    382 #ifdef CHROMIUM_THREADSAFE
    383370    crInitMutex(&list->lock);
    384371    crInitCondition(&list->nonEmpty);
    385 #endif
    386372}
    387373
     
    400386    CRMessageListNode *node;
    401387
    402 #ifdef CHROMIUM_THREADSAFE
    403388    crLockMutex(&list->lock);
    404 #endif
    405389
    406390    node = (CRMessageListNode *) crAlloc(sizeof(CRMessageListNode));
     
    419403    list->numMessages++;
    420404
    421 #ifdef CHROMIUM_THREADSAFE
    422405    crSignalCondition(&list->nonEmpty);
    423406    crUnlockMutex(&list->lock);
    424 #endif
    425407}
    426408
     
    437419    int retval;
    438420
    439 #ifdef CHROMIUM_THREADSAFE
    440421    crLockMutex(&list->lock);
    441 #endif
    442422
    443423    if (list->head) {
     
    467447    }
    468448
    469 #ifdef CHROMIUM_THREADSAFE
    470449    crUnlockMutex(&list->lock);
    471 #endif
    472 
    473450    return retval;
    474451}
     
    488465    CRMessageListNode *node;
    489466
    490 #ifdef CHROMIUM_THREADSAFE
    491467    crLockMutex(&list->lock);
    492 #endif
    493 
    494 #ifdef CHROMIUM_THREADSAFE
     468
    495469    while (!list->head) {
    496470        crWaitCondition(&list->nonEmpty, &list->lock);
    497471    }
    498 #else
    499     CRASSERT(list->head);
    500 #endif
    501472
    502473    node = list->head;
     
    518489
    519490    crFree(node);
    520 
    521 #ifdef CHROMIUM_THREADSAFE
    522491    crUnlockMutex(&list->lock);
    523 #endif
    524492}
    525493
     
    653621{
    654622    conn->Disconnect( conn );
    655 #ifdef CHROMIUM_THREADSAFE
    656623    crFreeMutex( &conn->messageList.lock );
    657 #endif
    658624    crFree( conn );
    659625}
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