--------------------- PatchSet 5220 Date: 2007/08/09 13:13:32 Author: amosjeffries Branch: docs Tag: (none) Log: Some CBDATA internal documentation. Most still TODO. Members: src/cbdata.cc:1.27->1.27.2.1 Index: squid3/src/cbdata.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/cbdata.cc,v retrieving revision 1.27 retrieving revision 1.27.2.1 diff -u -r1.27 -r1.27.2.1 --- squid3/src/cbdata.cc 28 Apr 2007 22:51:49 -0000 1.27 +++ squid3/src/cbdata.cc 9 Aug 2007 13:13:32 -0000 1.27.2.1 @@ -1,6 +1,6 @@ /* - * $Id: cbdata.cc,v 1.27 2007/04/28 22:51:49 squidadm Exp $ + * $Id: cbdata.cc,v 1.27.2.1 2007/08/09 13:13:32 amosjeffries Exp $ * * DEBUG: section 45 Callback Data Registry * ORIGINAL AUTHOR: Duane Wessels @@ -35,9 +35,12 @@ * */ -/* +/** + \defgroup CBDATAInternal CBDATA Internals + \ingroup CBDATA + * * These routines manage a set of registered callback data pointers. - * One of the easiest ways to make Squid coredump is to issue a + * One of the easiest ways to make Squid coredump is to issue a * callback to for some data structure which has previously been * freed. With these routines, we register (add) callback data * pointers, lock them just before registering the callback function, @@ -77,11 +80,13 @@ #endif +/// \ingroup CBDATAInternal #define OFFSET_OF(TYPE, MEMBER) ((size_t) &(((TYPE) *)0)->(MEMBER)) +/// \ingroup CBDATAInternal class cbdata { - /* TODO: examine making cbdata templated on this - so we get type + /** \todo examine making cbdata templated on this - so we get type * safe access to data - RBC 20030902 */ public: #if HASHED_CBDATA @@ -146,13 +151,15 @@ return where; } +/** + * Only ever invoked when placement new throws + * an exception. Used to prevent an incorrect + * free. + */ void cbdata::operator delete(void *where, void *where2) { - /* Only ever invoked when placement new throws - * an exception. Used to prevent an incorrect - * free. - */ + ; } long @@ -163,7 +170,7 @@ return (long)dataOffset; } #else -MEMPROXY_CLASS_INLINE(cbdata) +MEMPROXY_CLASS_INLINE(cbdata) /**DOCS_NOSEMI*/ #endif static OBJH cbdataDump; @@ -171,13 +178,15 @@ static OBJH cbdataDumpHistory; #endif +/// \ingroup CBDATAInternal struct CBDataIndex { MemAllocator *pool; FREE *free_func; } - *cbdata_index = NULL; + +/// \ingroup CBDATAInternal int cbdata_types = 0; #if HASHED_CBDATA