190792Sgshapiro<html> 290792Sgshapiro<head> 390792Sgshapiro <title>libsm : General Definitions</title> 490792Sgshapiro</head> 590792Sgshapiro<body> 690792Sgshapiro 790792Sgshapiro<a href="index.html">Back to libsm overview</a> 890792Sgshapiro 990792Sgshapiro<center> 1090792Sgshapiro <h1> libsm : General Definitions </h1> 11266527Sgshapiro <br> $Id: gen.html,v 1.5 2000-12-08 21:41:42 ca Exp $ 1290792Sgshapiro</center> 1390792Sgshapiro 1490792Sgshapiro<h2> Introduction </h2> 1590792Sgshapiro 1690792SgshapiroThe header file <tt><sm/gen.h></tt> 1790792Sgshapirocontains general definitions that are used by every other 1890792Sgshapiroheader file in <b>libsm</b>. 1990792Sgshapiro 2090792Sgshapiro<h2> Synopsis </h2> 2190792Sgshapiro 2290792Sgshapiro<pre> 2390792Sgshapiro#include <sm/gen.h> 2490792Sgshapiro 2590792Sgshapiro#define NULL ((void*)0) 2690792Sgshapiro 2790792Sgshapirotypedef int bool; 2890792Sgshapiro#define false 0 2990792Sgshapiro#define true 1 3090792Sgshapiro 3190792Sgshapiro#define SM_MAX(a, b) ((a) > (b) ? (a) : (b)) 3290792Sgshapiro#define SM_MIN(a, b) ((a) < (b) ? (a) : (b)) 3390792Sgshapiro 3490792Sgshapiro/* 3590792Sgshapiro** The following types can be accessed and updated atomically. 3690792Sgshapiro** This is relevant in the context of signal handlers and threads. 3790792Sgshapiro*/ 3890792Sgshapirotypedef <i>some signed integral type</i> SM_ATOMIC_INT_T; 3990792Sgshapirotypedef <i>some unsigned integral type</i> SM_ATOMIC_UINT_T; 4090792Sgshapiro</pre> 4190792Sgshapiro 4290792Sgshapiro</body> 4390792Sgshapiro</html> 44