VirtualBox

Changeset 18328 in vbox for trunk/src


Ignore:
Timestamp:
Mar 26, 2009 5:16:00 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
45103
Message:

crOpenGL: init mutexes as recursive, fix for #3758

Location:
trunk/src/VBox/GuestHost/OpenGL/util
Files:
2 edited

Legend:

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

    r15532 r18328  
    325325#else
    326326        conn->fd = open( conn->filename, O_CREAT | O_WRONLY | O_BINARY,
    327                                                                          S_IREAD | S_IWRITE | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
     327                                                                     S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
    328328#endif
    329329        if (conn->fd < 0)
  • trunk/src/VBox/GuestHost/OpenGL/util/threads.c

    r18326 r18328  
    134134    InitializeCriticalSection(mutex);
    135135#else
    136     pthread_mutex_init(mutex, NULL);
     136    pthread_mutexattr_t mta;
     137    int rc;
     138
     139    rc = pthread_mutexattr_init(&mta);
     140    CRASSERT(!rc);
     141    rc = pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE);
     142    CRASSERT(!rc);
     143    rc = pthread_mutex_init(mutex, &mta);
     144    CRASSERT(!rc);
     145    pthread_mutexattr_destroy(&mta);
    137146#endif
    138147}
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