Commit f74142e0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move LOCK/UNLOCK macros to cache.h where they belong.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@963 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 1e21702c
......@@ -433,3 +433,14 @@ cli_func_t cli_func_dump_pool;
/* rfc2616.c */
int RFC2616_cache_policy(struct sess *sp, struct http *hp);
#define LOCKSHM(foo) AZ(pthread_mutex_lock(foo))
#define UNLOCKSHM(foo) AZ(pthread_mutex_unlock(foo))
#if 1
#define LOCK(foo) AZ(pthread_mutex_lock(foo))
#define UNLOCK(foo) AZ(pthread_mutex_unlock(foo))
#else
#define LOCK(foo) do { AZ(pthread_mutex_lock(foo)); VSL(SLT_Debug, 0, "LOCK(%s,%s,%d," #foo ")", __func__, __FILE__, __LINE__); } while (0);
#define UNLOCK(foo) do { AZ(pthread_mutex_unlock(foo)); VSL(SLT_Debug, 0, "UNLOC(%s,%s,%d," #foo ")", __func__, __FILE__, __LINE__); } while (0);
#endif
......@@ -56,14 +56,3 @@ void lbv_xxxassert(const char *, const char *, int, const char *, int);
#define AN(foo) do { assert((foo) != NULL); } while (0)
#define XXXAZ(foo) do { xxxassert((foo) == 0); } while (0)
#define XXXAN(foo) do { xxxassert((foo) != NULL); } while (0)
#define LOCKSHM(foo) AZ(pthread_mutex_lock(foo))
#define UNLOCKSHM(foo) AZ(pthread_mutex_unlock(foo))
#if 1
#define LOCK(foo) AZ(pthread_mutex_lock(foo))
#define UNLOCK(foo) AZ(pthread_mutex_unlock(foo))
#else
#define LOCK(foo) do { AZ(pthread_mutex_lock(foo)); VSL(SLT_Debug, 0, "LOCK(%s,%s,%d," #foo ")", __func__, __FILE__, __LINE__); } while (0);
#define UNLOCK(foo) do { AZ(pthread_mutex_unlock(foo)); VSL(SLT_Debug, 0, "UNLOC(%s,%s,%d," #foo ")", __func__, __FILE__, __LINE__); } while (0);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment