cbdataUnlock.
/*
- * $Id: cbdata.cc,v 1.27 1998/12/05 00:54:17 wessels Exp $
+ * $Id: cbdata.cc,v 1.28 1999/09/28 23:48:46 wessels Exp $
*
* DEBUG: section 45 Callback Data Registry
* AUTHOR: Duane Wessels
}
void
+#if CBDATA_DEBUG
+cbdataLockDbg(const void *p, const char *file, int line)
+#else
cbdataLock(const void *p)
+#endif
{
cbdata *c;
if (p == NULL)
debug(45, 3) ("cbdataLock: %p\n", p);
assert(c != NULL);
c->locks++;
+#if CBDATA_DEBUG
+ c->file = file;
+ c->line = line;
+#endif
}
void
+#if CBDATA_DEBUG
+cbdataUnlockDbg(const void *p, const char *file, int line)
+#else
cbdataUnlock(const void *p)
+#endif
{
cbdata *c;
if (p == NULL)
assert(c != NULL);
assert(c->locks > 0);
c->locks--;
+#if CBDATA_DEBUG
+ c->file = file;
+ c->line = line;
+#endif
if (c->valid || c->locks)
return;
cbdataReallyFree(c);
/*
- * $Id: protos.h,v 1.344 1999/08/02 06:18:39 wessels Exp $
+ * $Id: protos.h,v 1.345 1999/09/28 23:48:47 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
extern void cbdataInit(void);
#if CBDATA_DEBUG
extern void cbdataAddDbg(const void *p, CBDUNL *, int, const char *, int);
+extern void cbdataLockDbg(const void *p, const char *, int);
+extern void cbdataUnlockDbg(const void *p, const char *, int);
#else
extern void cbdataAdd(const void *p, CBDUNL *, int);
-#endif
-extern void cbdataFree(void *p);
extern void cbdataLock(const void *p);
extern void cbdataUnlock(const void *p);
+#endif
+extern void cbdataFree(void *p);
extern int cbdataValid(const void *p);
extern CBDUNL cbdataXfree;
/*
- * $Id: squid.h,v 1.193 1999/06/24 20:20:07 wessels Exp $
+ * $Id: squid.h,v 1.194 1999/09/28 23:48:49 wessels Exp $
*
* AUTHOR: Duane Wessels
*
#if CBDATA_DEBUG
#define cbdataAdd(a,b,c) cbdataAddDbg(a,b,c,__FILE__,__LINE__)
+#define cbdataLock(a) cbdataLockDbg(a,__FILE__,__LINE__)
+#define cbdataUnlock(a) cbdataUnlockDbg(a,__FILE__,__LINE__)
#endif
#if USE_LEAKFINDER