Back to libsm overview

libsm : General Definitions

$Id: gen.html,v 1.5 2000/12/08 21:41:42 ca Exp $


The header file <sm/gen.h> contains general definitions that are used by every other header file in libsm.


#include <sm/gen.h>

#define NULL		((void*)0)

typedef int bool;
#define false	0
#define true	1

#define SM_MAX(a, b)	((a) > (b) ? (a) : (b))
#define SM_MIN(a, b)	((a) < (b) ? (a) : (b))

**  The following types can be accessed and updated atomically.
**  This is relevant in the context of signal handlers and threads.
typedef some signed integral type SM_ATOMIC_INT_T;
typedef some unsigned integral type SM_ATOMIC_UINT_T;