man rinit (Fonctions bibliothèques) - initalize the roy library

NAME

rinit - initalize the roy library

SYNOPSIS

#include <roy.h>

void rinit (void);

void rinit_threaded (void);

void rcleanup (void);

void rcleanup_add_hook (RCleanupHook function)

typedef void (*RCleanupHook) (void);

DESCRIPTION

Call rinit(3) before calling any roy api functions or macros. This call setups important globals needed by many of the data structures and helper functions.

rinit_threaded(3) is identical to rinit(3) except this must be used in its place if you are planning to do any threading work. This enables the locks around rchunk(3) and other data structures within roy.

rcleanup(3) cleans up any memory used by roy in globals.

rcleanup_add_hook(3) adds a function to be called when rcleanup(3) is called. The function should be defined as RCleanupHook above, for example:

void cleanuphook (void);

RETURN VALUE

These calls returns no value.

ERRORS

A call to rinit(3), rinit_threaded(3), rcleanup(3) or rcleanup_add_hook(3) will never fail.

SEE ALSO

roy(3)