Main Page   Data Structures   File List   Data Fields   Globals   Examples  

shbuferr.h File Reference

Go to the source code of this file.

Enumerations

enum  shbuf_error {
  SHBUF_NOERROR, SHBUF_BUSY, SHBUF_NOTINNOTIFYMODE, SHBUF_SYSTEM_ERROR_BASE = 100,
  SHBUF_COULDNOTCREATEMSGQ, SHBUF_COULDNOTMAPBUFFERSHM, SHBUF_COULDNOTCREATEBUFFERSHM, SHBUF_COULDNOTRESETSEM,
  SHBUF_COULDNOTCREATESEM, SHBUF_COULDNOTMAPCONTROLSHM, SHBUF_COULDNOTCREATECONTROLSHM, SHBUF_COULDNOTOPENMSGQ,
  SHBUF_COULDNOTOPENCONTROLSHM, SHBUF_COULDNOTOPENSEM, SHBUF_COULDNOTOPENBUFFERSHM, SHBUF_MSGSNDFAILED,
  SHBUF_SELECTFAILED, SHBUF_READFAILED, SHBUF_ACCESSMODEFAILED, SHBUF_COULDNOTCREATEPIPE,
  SHBUF_COULDNOTCREATETHREAD, SHBUF_LOCKFAILED, SHBUF_UNLOCKFAILED, SHBUF_INCOMPATIBLEBUFFER,
  SHBUF_MALLOCFAILED
}
 Error number specification. More...


Functions

void shbuf_set_errno (shbuf_error e)
 Sets the libshbuf specific error number.

shbuf_error shbuf_get_errno (void)
 Returns the current libshbuf specific error number.

const char * shbuf_strerror (shbuf_error e, int en)
 Converts a pair of libshbuf and libc error numbers to a human readable string.

const char * shbuf_strerror2 (void)
 Calls shbuf_strerror() with the current error numbers.

void shbuf_perror (const char *p)
 Emulates the libc perror() function but adds support for libshbuf specific errors.


Enumeration Type Documentation

enum shbuf_error
 

Error number specification.

Enumeration values:
SHBUF_NOERROR  No error occured.
SHBUF_BUSY  The shared buffer is already opened by another client.
SHBUF_NOTINNOTIFYMODE  The shbuf object is not in notify mode.
SHBUF_SYSTEM_ERROR_BASE  Errors with a greater value than this use the libc errno.
SHBUF_COULDNOTCREATEMSGQ 
SHBUF_COULDNOTMAPBUFFERSHM 
SHBUF_COULDNOTCREATEBUFFERSHM 
SHBUF_COULDNOTRESETSEM 
SHBUF_COULDNOTCREATESEM 
SHBUF_COULDNOTMAPCONTROLSHM 
SHBUF_COULDNOTCREATECONTROLSHM 
SHBUF_COULDNOTOPENMSGQ 
SHBUF_COULDNOTOPENCONTROLSHM 
SHBUF_COULDNOTOPENSEM 
SHBUF_COULDNOTOPENBUFFERSHM 
SHBUF_MSGSNDFAILED 
SHBUF_SELECTFAILED 
SHBUF_READFAILED 
SHBUF_ACCESSMODEFAILED 
SHBUF_COULDNOTCREATEPIPE 
SHBUF_COULDNOTCREATETHREAD 
SHBUF_LOCKFAILED 
SHBUF_UNLOCKFAILED 
SHBUF_INCOMPATIBLEBUFFER 
SHBUF_MALLOCFAILED 

Definition at line 26 of file shbuferr.h.


Function Documentation

shbuf_error shbuf_get_errno void   
 

Returns the current libshbuf specific error number.

Returns:
The current error number

void shbuf_perror const char *    p
 

Emulates the libc perror() function but adds support for libshbuf specific errors.

Parameters:
p  String to be printed adjacent to the current error string
Examples:
shbuftest.c.

void shbuf_set_errno shbuf_error    e
 

Sets the libshbuf specific error number.

Mainly for internal purposes, but useful for signal handlers too. The libshbuf error number is thread specific.

Parameters:
e  Error number to be set

const char* shbuf_strerror shbuf_error    e,
int    en
 

Converts a pair of libshbuf and libc error numbers to a human readable string.

The string is thread specific and freed on thread end. Following calls of this function may change the buffer returned.

Parameters:
e  libshbuf specific error number
en  libc specific error number
Returns:
The error numbers in a textual representation

const char* shbuf_strerror2 void   
 

Calls shbuf_strerror() with the current error numbers.

Returns:
The current error in a textual representation


Generated on Thu Sep 11 18:52:22 2003 for libshbuf by doxygen1.2.18