X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fthreads.c;h=f6221019a9e95377935d181d87defa955ad85150;hb=3f442f221a69097588beb7be8bdbffa0bbcd5448;hp=fb854bf575280c9a75b47e6e1b0f38ec0d546fcf;hpb=68024dbc1b04d5fc7422f5c67640475065e72399;p=citadel.git diff --git a/citadel/threads.c b/citadel/threads.c index fb854bf57..f6221019a 100644 --- a/citadel/threads.c +++ b/citadel/threads.c @@ -58,6 +58,7 @@ * remove the need for the calls to eCrashRegisterThread and friends */ +static int next_tid = 3; /* offset LWPID to PID */ static int num_threads = 0; /* Current number of threads */ static int num_workers = 0; /* Current number of worker threads */ long statcount = 0; /* are we doing a stats check? */ @@ -989,7 +990,8 @@ CtdlThreadNode *ctdl_internal_create_thread(char *name, long flags, void *(*thre free(this_thread); return NULL; } - + this_thread->reltid = next_tid; + next_tid++; num_threads++; // Increase the count of threads in the system. if(this_thread->flags & CTDLTHREAD_WORKER) num_workers++;