return *this; } nsProfileLock::~nsProfileLock() { Unlock(); } #if defined (XP_UNIX) static int setupPidLockCleanup; PRCList nsProfileLock::mPidLockList = PR_INIT_STATIC_CLIST(&nsProfileLock::mPidLockList); void nsProfileLock::RemovePidLockFiles(bool aFatalSignal) { while (!PR_CLIST_IS_EMPTY(&mPidLockList)) { nsProfileLock *lock = static_cast<nsProfileLock*>(mPidLockList.next); lock->Unlock(aFatalSignal); } } static struct sigaction SIGHUP_oldact; static struct sigaction SIGINT_oldact; static struct sigaction SIGQUIT_oldact; static struct sigaction SIGILL_oldact; static struct sigaction SIGABRT_oldact;
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "primpl.h" /* List of free stack virtual memory chunks */ PRLock *_pr_stackLock; PRCList _pr_freeStacks = PR_INIT_STATIC_CLIST(&_pr_freeStacks); PRIntn _pr_numFreeStacks; PRIntn _pr_maxFreeStacks = 4; #ifdef DEBUG /* ** A variable that can be set via the debugger... */ PRBool _pr_debugStacks = PR_FALSE; #endif /* How much space to leave between the stacks, at each end */ #define REDZONE (2 << _pr_pageShift) #define _PR_THREAD_STACK_PTR(_qp) \ ((PRThreadStack*) ((char*) (_qp) - offsetof(PRThreadStack,links))) void _PR_InitStacks(void) { _pr_stackLock = PR_NewLock(); }
* The Initial Developer of this code under the NPL is Netscape * Communications Corporation. Portions created by Netscape are * Copyright (C) 1998 Netscape Communications Corporation. All Rights * Reserved. */ /* * JavaScript Debugger API - 'High Level' functions */ #include "jsd.h" /***************************************************************************/ /* XXX not 'static' because of old Mac CodeWarrior bug */ PRCList _jsd_context_list = PR_INIT_STATIC_CLIST(&_jsd_context_list); /* these are used to connect JSD_SetUserCallbacks() with JSD_DebuggerOn() */ static JSD_UserCallbacks _callbacks; static void* _user = NULL; static JSTaskState* _jstaskstate = NULL; #ifdef JSD_HAS_DANGEROUS_THREAD static void* _dangerousThread = NULL; #endif #ifdef JSD_THREADSAFE void* _jsd_global_lock = NULL; #endif #ifdef DEBUG
"Invalid character", "Data is unsupported", "Modification disallowed", "Node not found", "Type is unsupported", "Attribute is alreay in use", "Invalid state", "Syntax error", "Invalid modification", "Namespace error", "Invalid access" }; PRLogModuleInfo* JavaDOMGlobals::log = NULL; PRCList JavaDOMGlobals::garbage = PR_INIT_STATIC_CLIST(&garbage); PRLock* JavaDOMGlobals::garbageLock = NULL; PRInt32 JavaDOMGlobals::javaMaxInt = 0; class jniDOMGarbage : public PRCList { public: jniDOMGarbage(nsISupports* p) { domObject = p; } nsISupports* domObject; }; void JavaDOMGlobals::Initialize(JNIEnv *env) { garbageLock = PR_NewLock();
PRLogModuleInfo *_pr_io_lm; PRLogModuleInfo *_pr_cvar_lm; PRLogModuleInfo *_pr_mon_lm; PRLogModuleInfo *_pr_linker_lm; PRLogModuleInfo *_pr_sched_lm; PRLogModuleInfo *_pr_thread_lm; PRLogModuleInfo *_pr_gc_lm; PRFileDesc *_pr_stdin; PRFileDesc *_pr_stdout; PRFileDesc *_pr_stderr; #if !defined(_PR_PTHREADS) PRCList _pr_active_local_threadQ = PR_INIT_STATIC_CLIST(&_pr_active_local_threadQ); PRCList _pr_active_global_threadQ = PR_INIT_STATIC_CLIST(&_pr_active_global_threadQ); _MDLock _pr_cpuLock; /* lock for the CPU Q */ PRCList _pr_cpuQ = PR_INIT_STATIC_CLIST(&_pr_cpuQ); PRUint32 _pr_utid; PRUintn _pr_userActive; PRUintn _pr_systemActive; PRUintn _pr_maxPTDs; #ifdef _PR_LOCAL_THREADS_ONLY struct _PRCPU *_pr_currentCPU;
#include "jsd.h" #ifdef NSPR20 #ifdef XP_MAC #include "prpriv.h" #else #include "private/prpriv.h" #endif #endif /** * XXX convert this and jsd_conv so that all accumulation of text done here * Also, use handle oriented alloc for Win16 64k limit problem */ PRCList jsd_source_list = PR_INIT_STATIC_CLIST(&jsd_source_list); PRCList jsd_removed_source_list = PR_INIT_STATIC_CLIST(&jsd_removed_source_list); /***************************************************************************/ /* * typedef enum * { * JSD_SOURCE_INITED, * JSD_SOURCE_PARTIAL, * JSD_SOURCE_COMPLETED, * JSD_SOURCE_ABORTED, * JSD_SOURCE_FAILED * * } JSDSourceStatus; */