Realm
A distributed, event-based tasking library
Loading...
Searching...
No Matches
bootstrap_util.h File Reference
#include <stdio.h>
Include dependency graph for bootstrap_util.h:

Go to the source code of this file.

Macros

#define BOOTSTRAP_ERROR_PRINT(...)
 
#define BOOTSTRAP_NE_ERROR_JMP(status, expected, err, label, ...)
 
#define BOOTSTRAP_NZ_ERROR_JMP(status, err, label, ...)
 
#define BOOTSTRAP_NULL_ERROR_JMP(var, status, err, label, ...)
 

Macro Definition Documentation

◆ BOOTSTRAP_ERROR_PRINT

#define BOOTSTRAP_ERROR_PRINT (   ...)
Value:
do { \
fprintf(stderr, "%s:%s:%d: ", __FILE__, __FUNCTION__, __LINE__); \
fprintf(stderr, __VA_ARGS__); \
} while(0)

◆ BOOTSTRAP_NE_ERROR_JMP

#define BOOTSTRAP_NE_ERROR_JMP (   status,
  expected,
  err,
  label,
  ... 
)
Value:
do { \
if(status != expected) { \
fprintf(stderr, "%s:%d: non-zero status: %d ", __FILE__, __LINE__, status); \
fprintf(stderr, __VA_ARGS__); \
status = err; \
goto label; \
} \
} while(0)

◆ BOOTSTRAP_NULL_ERROR_JMP

#define BOOTSTRAP_NULL_ERROR_JMP (   var,
  status,
  err,
  label,
  ... 
)
Value:
do { \
if(var == NULL) { \
fprintf(stderr, "%s:%d: NULL value ", __FILE__, __LINE__); \
fprintf(stderr, __VA_ARGS__); \
status = err; \
goto label; \
} \
} while(0)

◆ BOOTSTRAP_NZ_ERROR_JMP

#define BOOTSTRAP_NZ_ERROR_JMP (   status,
  err,
  label,
  ... 
)
Value:
do { \
if(status != 0) { \
fprintf(stderr, "%s:%d: non-zero status: %d ", __FILE__, __LINE__, status); \
fprintf(stderr, __VA_ARGS__); \
status = err; \
goto label; \
} \
} while(0)