odyssey/sources/macro.h

28 lines
563 B
C
Raw Normal View History

#ifndef ODYSSEY_MACRO_H
#define ODYSSEY_MACRO_H
/*
2018-03-12 14:03:15 +00:00
* Odyssey.
*
2018-04-04 13:19:58 +00:00
* Scalable PostgreSQL connection pooler.
*/
#define USE_SCRAM
#define od_likely(EXPR) __builtin_expect(!!(EXPR), 1)
#define od_unlikely(EXPR) __builtin_expect(!!(EXPR), 0)
#define od_container_of(N, T, F) ((T *)((char *)(N) - __builtin_offsetof(T, F)))
#define OK_RESPONSE 0
2020-07-08 06:26:17 +00:00
#define NOT_OK_RESPONSE -1
2020-07-08 08:27:56 +00:00
2020-07-26 07:58:15 +00:00
#define _STRINGIFY(x) #x
#define STRINGIFY(x) _STRINGIFY(x)
2020-07-26 07:58:15 +00:00
#define CONCAT_(A, B) A##B
#define CONCAT(A, B) CONCAT_(A, B)
2020-07-26 07:58:15 +00:00
2020-07-08 06:26:17 +00:00
typedef int od_retcode_t;
#endif /* ODYSSEY_MACRO_H */