Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Pubnub_c_core by
Diff: pubnub_mutex.h
- Revision:
- 0:d13755cfb705
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pubnub_mutex.h Thu Nov 10 22:20:11 2016 +0000 @@ -0,0 +1,32 @@ +/* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */ +#if !defined INC_PUBNUB_MUTEX +#define INC_PUBNUB_MUTEX + + +#if PUBNUB_THREADSAFE +#include "pbpal_mutex.h" + + +#define pubnub_mutex_t pbpal_mutex_t +#define pubnub_mutex_init(m) pbpal_mutex_init(m) +#define pubnub_mutex_lock(m) pbpal_mutex_lock(m) +#define pubnub_mutex_unlock(m) pbpal_mutex_unlock(m) +#define pubnub_mutex_destroy(m) pbpal_mutex_destroy(m) +#define pubnub_mutex_decl_and_init(m) pbpal_mutex_decl_and_init(m) +#define pubnub_mutex_static_decl_and_init(m) pbpal_mutex_static_decl_and_init(m) +#define pubnub_mutex_init_static(m) pbpal_mutex_init_static(m) + +#else + +typedef struct { int dummy; } pubnub_mutex_t; +#define pubnub_mutex_init(m) +#define pubnub_mutex_lock(m) +#define pubnub_mutex_unlock(m) +#define pubnub_mutex_destroy(m) +#define pubnub_mutex_decl_and_init(m) +#define pubnub_mutex_static_decl_and_init(m) +#define pubnub_mutex_init_static(m) + +#endif + +#endif /* !defined INC_PUBNUB_MUTEX */