cause a boom in the auto purger due to some change in the tsd I think.
Anyway, they've servered their purpose now.
int do_perminute_housekeeping_now = 0;
time_t now;
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
/*
* We do it this way instead of wrapping the whole loop in an
* S_HOUSEKEEPING critical section because it eliminates the need to
end_critical_section(S_HOUSEKEEPING);
if (do_housekeeping_now == 0) {
end_critical_section(S_HOUSEKEEPING);
if (do_housekeeping_now == 0) {
* All done.
*/
housekeeping_in_progress = 0;
* All done.
*/
housekeeping_in_progress = 0;
struct CtdlThreadNode *_this_cit_thread;\
_this_cit_thread = CtdlThreadSelf()
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 */
#endif /* CTDL_MODULE_H */
void JournalRunQueue(void) {
struct jnlq *jptr = NULL;
void JournalRunQueue(void) {
struct jnlq *jptr = NULL;
- CtdlThreadPushName("JournalRunQueue");
while (jnlq != NULL) {
begin_critical_section(S_JOURNAL_QUEUE);
if (jnlq != NULL) {
while (jnlq != NULL) {
begin_critical_section(S_JOURNAL_QUEUE);
if (jnlq != NULL) {
end_critical_section(S_JOURNAL_QUEUE);
JournalRunQueueMsg(jptr);
}
end_critical_section(S_JOURNAL_QUEUE);
JournalRunQueueMsg(jptr);
}
{
struct SessionFunctionHook *fcn = NULL;
{
struct SessionFunctionHook *fcn = NULL;
- CtdlThreadPushName("PerformSessionHooks");
-
for (fcn = SessionHookTable; fcn != NULL; fcn = fcn->next) {
if (fcn->eventtype == EventType) {
(*fcn->h_function_pointer) ();
}
}
for (fcn = SessionHookTable; fcn != NULL; fcn = fcn->next) {
if (fcn->eventtype == EventType) {
(*fcn->h_function_pointer) ();
}
}
}
void PerformUserHooks(struct ctdluser *usbuf, int EventType)
{
struct UserFunctionHook *fcn = NULL;
}
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);
}
}
for (fcn = UserHookTable; fcn != NULL; fcn = fcn->next) {
if (fcn->eventtype == EventType) {
(*fcn->h_function_pointer) (usbuf);
}
}
}
int PerformMessageHooks(struct CtdlMessage *msg, int EventType)
}
int PerformMessageHooks(struct CtdlMessage *msg, int EventType)
struct MessageFunctionHook *fcn = NULL;
int total_retval = 0;
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",
/* 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",
*/
if (msg->cm_flags & CM_SKIP_HOOKS) {
lprintf(CTDL_DEBUG, "Skipping hooks\n");
*/
if (msg->cm_flags & CM_SKIP_HOOKS) {
lprintf(CTDL_DEBUG, "Skipping hooks\n");
* this is an EVT_BEFORESAVE event, a nonzero return code will cause
* the save operation to abort.
*/
* this is an EVT_BEFORESAVE event, a nonzero return code will cause
* the save operation to abort.
*/
struct RoomFunctionHook *fcn;
int total_retval = 0;
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) {
lprintf(CTDL_DEBUG, "Performing room hooks for <%s>\n", target_room->QRname);
for (fcn = RoomHookTable; fcn != NULL; fcn = fcn->next) {
/* Return the sum of the return codes from the hook functions.
*/
/* Return the sum of the return codes from the hook functions.
*/
struct NetprocFunctionHook *fcn;
int total_retval = 0;
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);
for (fcn = NetprocHookTable; fcn != NULL; fcn = fcn->next) {
total_retval = total_retval +
(*fcn->h_function_pointer) (msg, 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.
*/
/* Return the sum of the return codes from the hook functions.
* A nonzero return code will cause the message to *not* be imported.
*/
{
struct DeleteFunctionHook *fcn;
{
struct DeleteFunctionHook *fcn;
- CtdlThreadPushName("PerformDeleteHooks");
-
for (fcn = DeleteHookTable; fcn != NULL; fcn = fcn->next) {
(*fcn->h_function_pointer) (room, msgnum);
}
for (fcn = DeleteHookTable; fcn != NULL; fcn = fcn->next) {
(*fcn->h_function_pointer) (room, msgnum);
}
int total_sent = 0;
int p;
int total_sent = 0;
int p;
- CtdlThreadPushName("PerformXmsgHooks");
-
for (p=0; p<MAX_XMSG_PRI; ++p) {
for (fcn = XmsgHookTable; fcn != NULL; fcn = fcn->next) {
if (fcn->order == p) {
for (p=0; p<MAX_XMSG_PRI; ++p) {
for (fcn = XmsgHookTable; fcn != NULL; fcn = fcn->next) {
if (fcn->order == p) {
*/
if (total_sent) break;
}
*/
if (total_sent) break;
}