| 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_pmdfAddress of a procedure to call to sleep the process or thread. Used for input only.
sleep_procA short description identifying the usage being made by the popstore API client. Used for input only.
usageLength in bytes of the usage description,
usage_lenusage. 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_initfails,POPSTORE_enddoes not need to be called. However,POPSTORE_endcan be called even when a call toPOPSTORE_inithas 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 theusageargument. This information will be passed to any site-supplied logging procedure as part of thePOPSTORE_LOG_STARTlogging 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_procargument. The procedure takes the form
where
void sleep (centi_seconds) unsigned long centi_seconds;centi_secondsis 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 |