publish final code
Fork of Pubnub_c_core by
pubnub_mutex.h@3:9cb790d5df10, 2017-02-21 (annotated)
- Committer:
- cswiger
- Date:
- Tue Feb 21 22:23:28 2017 +0000
- Revision:
- 3:9cb790d5df10
- Parent:
- 0:d13755cfb705
Publish final project code
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sveljko | 0:d13755cfb705 | 1 | /* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */ |
sveljko | 0:d13755cfb705 | 2 | #if !defined INC_PUBNUB_MUTEX |
sveljko | 0:d13755cfb705 | 3 | #define INC_PUBNUB_MUTEX |
sveljko | 0:d13755cfb705 | 4 | |
sveljko | 0:d13755cfb705 | 5 | |
sveljko | 0:d13755cfb705 | 6 | #if PUBNUB_THREADSAFE |
sveljko | 0:d13755cfb705 | 7 | #include "pbpal_mutex.h" |
sveljko | 0:d13755cfb705 | 8 | |
sveljko | 0:d13755cfb705 | 9 | |
sveljko | 0:d13755cfb705 | 10 | #define pubnub_mutex_t pbpal_mutex_t |
sveljko | 0:d13755cfb705 | 11 | #define pubnub_mutex_init(m) pbpal_mutex_init(m) |
sveljko | 0:d13755cfb705 | 12 | #define pubnub_mutex_lock(m) pbpal_mutex_lock(m) |
sveljko | 0:d13755cfb705 | 13 | #define pubnub_mutex_unlock(m) pbpal_mutex_unlock(m) |
sveljko | 0:d13755cfb705 | 14 | #define pubnub_mutex_destroy(m) pbpal_mutex_destroy(m) |
sveljko | 0:d13755cfb705 | 15 | #define pubnub_mutex_decl_and_init(m) pbpal_mutex_decl_and_init(m) |
sveljko | 0:d13755cfb705 | 16 | #define pubnub_mutex_static_decl_and_init(m) pbpal_mutex_static_decl_and_init(m) |
sveljko | 0:d13755cfb705 | 17 | #define pubnub_mutex_init_static(m) pbpal_mutex_init_static(m) |
sveljko | 0:d13755cfb705 | 18 | |
sveljko | 0:d13755cfb705 | 19 | #else |
sveljko | 0:d13755cfb705 | 20 | |
sveljko | 0:d13755cfb705 | 21 | typedef struct { int dummy; } pubnub_mutex_t; |
sveljko | 0:d13755cfb705 | 22 | #define pubnub_mutex_init(m) |
sveljko | 0:d13755cfb705 | 23 | #define pubnub_mutex_lock(m) |
sveljko | 0:d13755cfb705 | 24 | #define pubnub_mutex_unlock(m) |
sveljko | 0:d13755cfb705 | 25 | #define pubnub_mutex_destroy(m) |
sveljko | 0:d13755cfb705 | 26 | #define pubnub_mutex_decl_and_init(m) |
sveljko | 0:d13755cfb705 | 27 | #define pubnub_mutex_static_decl_and_init(m) |
sveljko | 0:d13755cfb705 | 28 | #define pubnub_mutex_init_static(m) |
sveljko | 0:d13755cfb705 | 29 | |
sveljko | 0:d13755cfb705 | 30 | #endif |
sveljko | 0:d13755cfb705 | 31 | |
sveljko | 0:d13755cfb705 | 32 | #endif /* !defined INC_PUBNUB_MUTEX */ |