From a3df97101b1442ebc2e332f42aa0d5897e265d32 Mon Sep 17 00:00:00 2001 From: Dave West Date: Fri, 30 Nov 2007 23:31:56 +0000 Subject: [PATCH] Removed the PushName and PopName debugging macros that I added. They cause a boom in the auto purger due to some change in the tsd I think. Anyway, they've servered their purpose now. --- citadel/housekeeping.c | 4 ---- citadel/include/ctdl_module.h | 13 ------------- citadel/journaling.c | 2 -- citadel/serv_extensions.c | 23 ----------------------- 4 files changed, 42 deletions(-) diff --git a/citadel/housekeeping.c b/citadel/housekeeping.c index 8d65e0ec7..b0d4a1d26 100644 --- a/citadel/housekeeping.c +++ b/citadel/housekeeping.c @@ -140,8 +140,6 @@ void do_housekeeping(void) { int do_perminute_housekeeping_now = 0; time_t now; - CtdlThreadPushName("do_housekeeping"); - /* * We do it this way instead of wrapping the whole loop in an * S_HOUSEKEEPING critical section because it eliminates the need to @@ -160,7 +158,6 @@ void do_housekeeping(void) { end_critical_section(S_HOUSEKEEPING); if (do_housekeeping_now == 0) { - CtdlThreadPopName(); return; } @@ -184,5 +181,4 @@ void do_housekeeping(void) { * All done. */ housekeeping_in_progress = 0; - CtdlThreadPopName(); } diff --git a/citadel/include/ctdl_module.h b/citadel/include/ctdl_module.h index c83555c8f..bab177d69 100644 --- a/citadel/include/ctdl_module.h +++ b/citadel/include/ctdl_module.h @@ -127,17 +127,4 @@ int CtdlThreadSelect(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds struct CtdlThreadNode *_this_cit_thread;\ _this_cit_thread = CtdlThreadSelf() - -#ifdef WITH_THREADLOG -#define CtdlThreadPushName(NAME) \ - char *_push_name; \ - _push_name = CtdlThreadName(CtdlThreadSelf(), NAME) - -#define CtdlThreadPopName() \ - free (CtdlThreadName(CtdlThreadSelf(), _push_name)) -#else -#define CtdlThreadPushName(NAME) -#define CtdlThreadPopName() -#endif - #endif /* CTDL_MODULE_H */ diff --git a/citadel/journaling.c b/citadel/journaling.c index 267d781a4..a0ebeb21d 100644 --- a/citadel/journaling.c +++ b/citadel/journaling.c @@ -262,7 +262,6 @@ void JournalRunQueueMsg(struct jnlq *jmsg) { void JournalRunQueue(void) { struct jnlq *jptr = NULL; - CtdlThreadPushName("JournalRunQueue"); while (jnlq != NULL) { begin_critical_section(S_JOURNAL_QUEUE); if (jnlq != NULL) { @@ -272,7 +271,6 @@ void JournalRunQueue(void) { end_critical_section(S_JOURNAL_QUEUE); JournalRunQueueMsg(jptr); } - CtdlThreadPopName(); } diff --git a/citadel/serv_extensions.c b/citadel/serv_extensions.c index 5ea03d673..18e425830 100644 --- a/citadel/serv_extensions.c +++ b/citadel/serv_extensions.c @@ -922,29 +922,22 @@ void PerformSessionHooks(int EventType) { struct SessionFunctionHook *fcn = NULL; - CtdlThreadPushName("PerformSessionHooks"); - for (fcn = SessionHookTable; fcn != NULL; fcn = fcn->next) { if (fcn->eventtype == EventType) { (*fcn->h_function_pointer) (); } } - CtdlThreadPopName(); - } void PerformUserHooks(struct ctdluser *usbuf, int EventType) { struct UserFunctionHook *fcn = NULL; - CtdlThreadPushName("PerformUserHooks"); - for (fcn = UserHookTable; fcn != NULL; fcn = fcn->next) { if (fcn->eventtype == EventType) { (*fcn->h_function_pointer) (usbuf); } } - CtdlThreadPopName(); } int PerformMessageHooks(struct CtdlMessage *msg, int EventType) @@ -952,8 +945,6 @@ int PerformMessageHooks(struct CtdlMessage *msg, int EventType) struct MessageFunctionHook *fcn = NULL; int total_retval = 0; - CtdlThreadPushName("PerformMessageHooks"); - /* Other code may elect to protect this message from server-side * handlers; if this is the case, don't do anything. lprintf(CTDL_DEBUG, "** Event type is %d, flags are %d\n", @@ -961,7 +952,6 @@ int PerformMessageHooks(struct CtdlMessage *msg, int EventType) */ if (msg->cm_flags & CM_SKIP_HOOKS) { lprintf(CTDL_DEBUG, "Skipping hooks\n"); - CtdlThreadPopName(); return(0); } @@ -978,7 +968,6 @@ int PerformMessageHooks(struct CtdlMessage *msg, int EventType) * this is an EVT_BEFORESAVE event, a nonzero return code will cause * the save operation to abort. */ - CtdlThreadPopName(); return total_retval; } @@ -988,8 +977,6 @@ int PerformRoomHooks(struct ctdlroom *target_room) struct RoomFunctionHook *fcn; int total_retval = 0; - CtdlThreadPushName("PerformRoomHooks"); - lprintf(CTDL_DEBUG, "Performing room hooks for <%s>\n", target_room->QRname); for (fcn = RoomHookTable; fcn != NULL; fcn = fcn->next) { @@ -998,7 +985,6 @@ int PerformRoomHooks(struct ctdlroom *target_room) /* Return the sum of the return codes from the hook functions. */ - CtdlThreadPopName(); return total_retval; } @@ -1008,8 +994,6 @@ int PerformNetprocHooks(struct CtdlMessage *msg, char *target_room) struct NetprocFunctionHook *fcn; int total_retval = 0; - CtdlThreadPushName("PerformNetprocHooks"); - for (fcn = NetprocHookTable; fcn != NULL; fcn = fcn->next) { total_retval = total_retval + (*fcn->h_function_pointer) (msg, target_room); @@ -1018,7 +1002,6 @@ int PerformNetprocHooks(struct CtdlMessage *msg, char *target_room) /* Return the sum of the return codes from the hook functions. * A nonzero return code will cause the message to *not* be imported. */ - CtdlThreadPopName(); return total_retval; } @@ -1027,12 +1010,9 @@ void PerformDeleteHooks(char *room, long msgnum) { struct DeleteFunctionHook *fcn; - CtdlThreadPushName("PerformDeleteHooks"); - for (fcn = DeleteHookTable; fcn != NULL; fcn = fcn->next) { (*fcn->h_function_pointer) (room, msgnum); } - CtdlThreadPopName(); } @@ -1045,8 +1025,6 @@ int PerformXmsgHooks(char *sender, char *recp, char *msg) int total_sent = 0; int p; - CtdlThreadPushName("PerformXmsgHooks"); - for (p=0; pnext) { if (fcn->order == p) { @@ -1062,7 +1040,6 @@ int PerformXmsgHooks(char *sender, char *recp, char *msg) */ if (total_sent) break; } - CtdlThreadPopName(); return total_sent; } -- 2.30.2