Skip to content

Commit

Permalink
Add env_assert() API
Browse files Browse the repository at this point in the history
Signed-off-by: Wendy Liang <[email protected]>
  • Loading branch information
wjliang committed Apr 21, 2016
1 parent e015acf commit b1b5bc4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/include/openamp/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
* env_strcpy
* env_strncpy
* env_print
* env_assert
* env_map_vatopa
* env_map_patova
* env_mb
Expand Down Expand Up @@ -139,6 +140,10 @@ int env_strcmp(const char *, const char *);
void env_strncpy(char *, const char *, unsigned long);
int env_strncmp(char *, const char *, unsigned long);
#define env_print(...) printf(__VA_ARGS__)
#define env_assert(_exp, _msg) do { \
if (!(_exp)) {env_print("%s: %s", __func__, _msg); while(1);} \
} while(0)


/**
*-----------------------------------------------------------------------------
Expand Down

0 comments on commit b1b5bc4

Please sign in to comment.