Previous | Contents | Index |
Initialize the popstore API.
int POPSTORE_init (init_pmdf, sleep_proc, usage, usage_len) int init_pmdf; void (*sleep_proc)(); char *usage; int usage_len;
Boolean flag, 0 or 1, indicating whether or not to also call PMDF_initialize. Used for input only.
init_pmdf
Address of a procedure to call to sleep the process or thread. Used for input only.
sleep_proc
A short description identifying the usage being made by the popstore API client. Used for input only.
usage
Length in bytes of the usage description,
usage_len
usage
. Used for input only.
To use the popstore API, you must first initialize the API by callingPOPSTORE_init
. When through using the popstore API, callPOPSTORE_end
. When a call toPOPSTORE_init
fails,POPSTORE_end
does not need to be called. However,POPSTORE_end
can be called even when a call toPOPSTORE_init
has failed. If PMDF has not already been initialized via the PMDF API subroutine PMDF_initialize, then you must specify a value of 1 forinit_pmdf
. Otherwise, specify a value of 0. A brief description of the intended usage can be specified with theusage
argument. This information will be passed to any site-supplied logging procedure as part of thePOPSTORE_LOG_START
logging call. When the popstore API is used by a multi-threaded process, the address of a procedure to sleep a single thread should be supplied with thesleep_proc
argument. The procedure takes the form
where
void sleep (centi_seconds) unsigned long centi_seconds;centi_seconds
is the number of hundredths of seconds to sleep the thread for. When a null is passed for the value ofsleep_proc
, the popstore API will use a default sleep procedure.4
POPSTORE_SUCCESS Normal, successful completion. POPSTORE_BADARG Illegal value specified for the USERNAME_STYLE or USERNAME_CHARSET options; initialization failed. POPSTORE_LOADERROR Unable to load a site-supplied callable image; initialization failed. POPSTORE_PMDFINITERR Unable to initialize PMDF; initialization failed. POPSTORE_READERROR Unable to read the popstore option file; initialization failed.
4 Presently, the sleep procedure is only used in the event that a file cannot be opened or created for some unknown reason. In such situations, the popstore will sleep for a brief period of time and attempt to open or create the file a second time. |
Previous | Next | Contents | Index |