prcalloncetype.rst (815B)
1 PRCallOnceType 2 ============== 3 4 Structure for tracking initialization. 5 6 7 Syntax 8 ------ 9 10 .. code:: 11 12 #include <prinit.h> 13 14 typedef struct PRCallOnceType { 15 PRIntn initialized; 16 PRInt32 inProgress; 17 PRStatus status; 18 } PRCallOnceType; 19 20 21 Fields 22 ~~~~~~ 23 24 The structure has these fields: 25 26 ``initialized`` 27 If not zero, the initialization process has been completed. 28 ``inProgress`` 29 If not zero, the initialization process is currently being executed. 30 Calling threads that observe this status block until inProgress is 31 zero. 32 ``status`` 33 An indication of the outcome of the initialization process. 34 35 36 Description 37 ----------- 38 39 The client is responsible for initializing the :ref:`PRCallOnceType` 40 structure to all zeros. This initialization must be accomplished before 41 any threading issues exist.