VirtualBox

Ignore:
Timestamp:
Nov 22, 2023 10:31:33 AM (14 months ago)
Author:
vboxsync
Message:

libs/xpcom: Remove the generic intialization routine from nsprpub now that there is only some lock init done and move it the lock code, bugref:10545

Location:
trunk/src/libs/xpcom18a4/nsprpub/pr
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/primpl.h

    r102234 r102241  
    9494};
    9595
    96 extern void _PR_InitLocks(void);
    97 
    9896struct PRCondVar {
    9997    PRLock *lock;               /* associated lock that protects the condition */
     
    114112/************************************************************************/
    115113
    116 extern PRBool _pr_initialized;
    117 extern void _PR_ImplicitInitialization(void);
    118 
    119114PR_END_EXTERN_C
    120115
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/pthreads/ptsynch.c

    r102240 r102241  
    108108static pthread_condattr_t _pt_cvar_attr;
    109109
     110static PRBool _pr_initialized = PR_FALSE;
     111
    110112static void PR_DestroyCondVar(PRCondVar *cvar);
    111113
     
    116118/**************************************************************/
    117119
    118 void _PR_InitLocks(void)
    119 {
     120static void _PR_InitLocks(void)
     121{
     122    _pr_initialized = PR_TRUE;
     123
    120124    int rv;
    121125    rv = _PT_PTHREAD_MUTEXATTR_INIT(&_pt_mattr);
     
    395399    PRCondVar *cvar;
    396400
    397     if (!_pr_initialized) _PR_ImplicitInitialization();
     401    if (!_pr_initialized) _PR_InitLocks();
    398402
    399403    cvar = PR_NEWZAP(PRCondVar);
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