View | Details | Raw Unified | Return to bug 27300
Collapse All | Expand All

(-)mozilla/security/nss/lib/nss/nssinit.c.784672 (+16 lines)
Lines 944-949 NSS_RegisterShutdown(NSS_ShutdownFunc sF Link Here
944
{
944
{
945
    int i;
945
    int i;
946
946
947
    /* make sure our lock and condition variable are initialized one and only
948
     * one time */ 
949
    if (PR_CallOnce(&nssInitOnce, nss_doLockInit) != PR_SUCCESS) {
950
	return SECFailure;
951
    }
952
947
    PZ_Lock(nssInitLock);
953
    PZ_Lock(nssInitLock);
948
    if (!NSS_IsInitialized()) {
954
    if (!NSS_IsInitialized()) {
949
	PZ_Unlock(nssInitLock);
955
	PZ_Unlock(nssInitLock);
Lines 1002-1007 NSS_UnregisterShutdown(NSS_ShutdownFunc Link Here
1002
{
1008
{
1003
    int i;
1009
    int i;
1004
1010
1011
    /* make sure our lock and condition variable are initialized one and only
1012
     * one time */ 
1013
    if (PR_CallOnce(&nssInitOnce, nss_doLockInit) != PR_SUCCESS) {
1014
	return SECFailure;
1015
    }
1005
    PZ_Lock(nssInitLock);
1016
    PZ_Lock(nssInitLock);
1006
    if (!NSS_IsInitialized()) {
1017
    if (!NSS_IsInitialized()) {
1007
	PZ_Unlock(nssInitLock);
1018
	PZ_Unlock(nssInitLock);
Lines 1192-1197 NSS_ShutdownContext(NSSInitContext *cont Link Here
1192
{
1203
{
1193
    SECStatus rv = SECSuccess;
1204
    SECStatus rv = SECSuccess;
1194
1205
1206
    /* make sure our lock and condition variable are initialized one and only
1207
     * one time */ 
1208
    if (PR_CallOnce(&nssInitOnce, nss_doLockInit) != PR_SUCCESS) {
1209
	return SECFailure;
1210
    }
1195
    PZ_Lock(nssInitLock);
1211
    PZ_Lock(nssInitLock);
1196
    /* If one or more threads are in the middle of init, wait for them
1212
    /* If one or more threads are in the middle of init, wait for them
1197
     * to complete */
1213
     * to complete */

Return to bug 27300