gicExit3
Initialize and uninitialize libgiigic
Part of gicInit(3).
Usage
#include <ggi/gic.h> int gicInit(void); int gicExit(void);
Overview
gicInit initializes the library. This function must be called before using other LibGIIGIC functions; otherwise the results will be undefined.
gicExit uninitializes the library (after being initialized by gicInit) and automatically cleans up if necessary. This should be called after an application finished using the library. If any GIC functions are called after the library has been uninitialized, the results will be undefined.
gicInit allows multiple invocations. A reference count is maintained, and to completely uninitialize the library, gicExit must be called as many times as gicInit has been called beforehand.
Return value
gicInit returns 0 for OK, otherwise an gii-error(3) code.
gicExit returns:
0-
after successfully cleaning up,
>0-
the number of 'open'
gicInitcalls, if there has been more than one call togicInit. AsgicInitandgicExitmust be used in properly nested pairs, e.g. the firstgicExitafter twogicInit's will return1.
<0-
gii-error(3), especially if moregicExitcalls have been done thangicInitcalls.
Examples
Initialize and uninitialize LibGIIGIC:
if (gicInit() < 0) {
fprintf(stderr, "Cannot initialize LibGIIGIC!\n");
exit(1);
}
/* Do some LibGIIGIC stuff */
gicExit();
Releases
3 releases since Debian 4.0 (Etch); the text changed 1 time.