corosync  2.3.2
Data Structures | Macros | Typedefs | Enumerations | Functions
corotypes.h File Reference
#include <stdint.h>
#include <errno.h>
#include <time.h>
#include <sys/time.h>
Include dependency graph for corotypes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cs_name_t
 
struct  cs_version_t
 

Macros

#define CS_FALSE   0
 
#define CS_TRUE   !CS_FALSE
 
#define CS_MAX_NAME_LENGTH   256
 
#define CS_TIME_END   ((cs_time_t)0x7FFFFFFFFFFFFFFFULL)
 
#define CS_MAX(x, y)   (((x) > (y)) ? (x) : (y))
 
#define CS_TRACK_CURRENT   0x01
 
#define CS_TRACK_CHANGES   0x02
 
#define CS_TRACK_CHANGES_ONLY   0x04
 
#define CS_IPC_TIMEOUT_MS   -1
 
#define CS_TIME_MS_IN_SEC   1000ULL
 
#define CS_TIME_US_IN_SEC   1000000ULL
 
#define CS_TIME_NS_IN_SEC   1000000000ULL
 
#define CS_TIME_US_IN_MSEC   1000ULL
 
#define CS_TIME_NS_IN_MSEC   1000000ULL
 
#define CS_TIME_NS_IN_USEC   1000ULL
 

Typedefs

typedef int64_t cs_time_t
 

Enumerations

enum  cs_dispatch_flags_t { CS_DISPATCH_ONE = 1, CS_DISPATCH_ALL = 2, CS_DISPATCH_BLOCKING = 3, CS_DISPATCH_ONE_NONBLOCKING = 4 }
 
enum  cs_error_t {
  CS_OK = 1, CS_ERR_LIBRARY = 2, CS_ERR_VERSION = 3, CS_ERR_INIT = 4,
  CS_ERR_TIMEOUT = 5, CS_ERR_TRY_AGAIN = 6, CS_ERR_INVALID_PARAM = 7, CS_ERR_NO_MEMORY = 8,
  CS_ERR_BAD_HANDLE = 9, CS_ERR_BUSY = 10, CS_ERR_ACCESS = 11, CS_ERR_NOT_EXIST = 12,
  CS_ERR_NAME_TOO_LONG = 13, CS_ERR_EXIST = 14, CS_ERR_NO_SPACE = 15, CS_ERR_INTERRUPT = 16,
  CS_ERR_NAME_NOT_FOUND = 17, CS_ERR_NO_RESOURCES = 18, CS_ERR_NOT_SUPPORTED = 19, CS_ERR_BAD_OPERATION = 20,
  CS_ERR_FAILED_OPERATION = 21, CS_ERR_MESSAGE_ERROR = 22, CS_ERR_QUEUE_FULL = 23, CS_ERR_QUEUE_NOT_AVAILABLE = 24,
  CS_ERR_BAD_FLAGS = 25, CS_ERR_TOO_BIG = 26, CS_ERR_NO_SECTIONS = 27, CS_ERR_CONTEXT_NOT_FOUND = 28,
  CS_ERR_TOO_MANY_GROUPS = 30, CS_ERR_SECURITY = 100
}
 

Functions

cs_error_t qb_to_cs_error (int result)
 
const char * cs_strerror (cs_error_t err)
 
cs_error_t hdb_error_to_cs (int res)
 

Macro Definition Documentation

#define CS_FALSE   0

Definition at line 50 of file corotypes.h.

Referenced by icmap_is_key_ro().

#define CS_IPC_TIMEOUT_MS   -1
#define CS_MAX (   x,
 
)    (((x) > (y)) ? (x) : (y))

Definition at line 54 of file corotypes.h.

#define CS_MAX_NAME_LENGTH   256
#define CS_TIME_END   ((cs_time_t)0x7FFFFFFFFFFFFFFFULL)

Definition at line 53 of file corotypes.h.

#define CS_TIME_MS_IN_SEC   1000ULL

Definition at line 113 of file corotypes.h.

#define CS_TIME_NS_IN_MSEC   1000000ULL

Definition at line 117 of file corotypes.h.

#define CS_TIME_NS_IN_SEC   1000000000ULL

Definition at line 115 of file corotypes.h.

#define CS_TIME_NS_IN_USEC   1000ULL

Definition at line 118 of file corotypes.h.

#define CS_TIME_US_IN_MSEC   1000ULL

Definition at line 116 of file corotypes.h.

#define CS_TIME_US_IN_SEC   1000000ULL

Definition at line 114 of file corotypes.h.

#define CS_TRACK_CHANGES   0x02

Definition at line 75 of file corotypes.h.

Referenced by sam_initialize().

#define CS_TRACK_CHANGES_ONLY   0x04

Definition at line 76 of file corotypes.h.

#define CS_TRACK_CURRENT   0x01

Definition at line 74 of file corotypes.h.

#define CS_TRUE   !CS_FALSE

Definition at line 51 of file corotypes.h.

Referenced by icmap_is_key_ro().

Typedef Documentation

typedef int64_t cs_time_t

Definition at line 48 of file corotypes.h.

Enumeration Type Documentation

Enumerator
CS_DISPATCH_ONE 
CS_DISPATCH_ALL 
CS_DISPATCH_BLOCKING 
CS_DISPATCH_ONE_NONBLOCKING 

Definition at line 67 of file corotypes.h.

enum cs_error_t
Enumerator
CS_OK 
CS_ERR_LIBRARY 
CS_ERR_VERSION 
CS_ERR_INIT 
CS_ERR_TIMEOUT 
CS_ERR_TRY_AGAIN 
CS_ERR_INVALID_PARAM 
CS_ERR_NO_MEMORY 
CS_ERR_BAD_HANDLE 
CS_ERR_BUSY 
CS_ERR_ACCESS 
CS_ERR_NOT_EXIST 
CS_ERR_NAME_TOO_LONG 
CS_ERR_EXIST 
CS_ERR_NO_SPACE 
CS_ERR_INTERRUPT 
CS_ERR_NAME_NOT_FOUND 
CS_ERR_NO_RESOURCES 
CS_ERR_NOT_SUPPORTED 
CS_ERR_BAD_OPERATION 
CS_ERR_FAILED_OPERATION 
CS_ERR_MESSAGE_ERROR 
CS_ERR_QUEUE_FULL 
CS_ERR_QUEUE_NOT_AVAILABLE 
CS_ERR_BAD_FLAGS 
CS_ERR_TOO_BIG 
CS_ERR_NO_SECTIONS 
CS_ERR_CONTEXT_NOT_FOUND 
CS_ERR_TOO_MANY_GROUPS 
CS_ERR_SECURITY 

Definition at line 78 of file corotypes.h.

Function Documentation

const char* cs_strerror ( cs_error_t  err)
cs_error_t hdb_error_to_cs ( int  res)
cs_error_t qb_to_cs_error ( int  result)