rcleanup(3)

rcleanup3

Initalize the roy library

Part of rinit(3).

Usage

#include <roy.h>

void rinit (void);

void rinit_threaded (void);

void rcleanup (void);

void rcleanup_add_hook (RCleanupHook function)

typedef void (*RCleanupHook) (void);

Overview

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.

From libroy-dev 1.0.8-1 in Debian 3.1 (Sarge). Parsed by carta from the page's man source.