diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /docs/nspr/reference/process_initialization.rst | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/nspr/reference/process_initialization.rst')
-rw-r--r-- | docs/nspr/reference/process_initialization.rst | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/docs/nspr/reference/process_initialization.rst b/docs/nspr/reference/process_initialization.rst new file mode 100644 index 0000000000..c5b0fd1763 --- /dev/null +++ b/docs/nspr/reference/process_initialization.rst @@ -0,0 +1,63 @@ +Process Initialization +====================== + +This chapter describes the NSPR API for versioning, process +initialization, and shutdown of NSPR. + +- `Identity and Versioning <#Identity_and_Versioning>`__ +- `Initialization and Cleanup <#Initialization_and_Cleanup>`__ +- `Module Initialization <#Module_Initialization>`__ + +.. _Identity_and_Versioning: + +Identity and Versioning +----------------------- + +.. _Name_and_Version_Constants: + +Name and Version Constants +~~~~~~~~~~~~~~~~~~~~~~~~~~ + + - :ref:`PR_NAME` + - :ref:`PR_VERSION` + - :ref:`PR_VersionCheck` + +.. _Initialization_and_Cleanup: + +Initialization and Cleanup +-------------------------- + +NSPR detects whether the library has been initialized and performs +implicit initialization if it hasn't. Implicit initialization should +suffice unless a program has specific sequencing requirements or needs +to characterize the primordial thread. Explicit initialization is rarely +necessary. + +Implicit initialization assumes that the initiator is the primordial +thread and that the thread is a user thread of normal priority. + + - :ref:`PR_Init` + - :ref:`PR_Initialize` + - :ref:`PR_Initialized` + - :ref:`PR_Cleanup` + - :ref:`PR_DisableClockInterrupts` + - :ref:`PR_BlockClockInterrupts` + - :ref:`PR_UnblockClockInterrupts` + - :ref:`PR_SetConcurrency` + - :ref:`PR_ProcessExit` + - :ref:`PR_Abort` + +.. _Module_Initialization: + +Module Initialization +~~~~~~~~~~~~~~~~~~~~~ + +Initialization can be tricky in a threaded environment, especially +initialization that must happen exactly once. :ref:`PR_CallOnce` ensures +that such initialization code is called only once. This facility is +recommended in situations where complicated global initialization is +required. + + - :ref:`PRCallOnceType` + - :ref:`PRCallOnceFN` + - :ref:`PR_CallOnce` |