summaryrefslogtreecommitdiff
path: root/memcached.h
diff options
context:
space:
mode:
Diffstat (limited to 'memcached.h')
-rw-r--r--memcached.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/memcached.h b/memcached.h
index c75ef46..628f043 100644
--- a/memcached.h
+++ b/memcached.h
@@ -464,6 +464,13 @@ enum store_item_type do_store_item(item *item, int comm, conn* c);
conn *conn_new(const int sfd, const enum conn_states init_state, const int event_flags, const int read_buffer_size, enum network_transport transport, struct event_base *base);
extern int daemonize(int nochdir, int noclose);
+static inline int mutex_lock(pthread_mutex_t *mutex)
+{
+ while (pthread_mutex_trylock(mutex));
+ return 0;
+}
+
+#define mutex_unlock(x) pthread_mutex_unlock(x)
#include "stats.h"
#include "slabs.h"