X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fsysdep.c;h=b89680c9eeda02ea3f001fd25cf54860a86b9869;hb=cab2dbf7872d4ff2d86b0a0db8d1899825d7482f;hp=12ef309cc88531231e0c7acc2e53044d44491477;hpb=8e3a7d805d6a7f1a804c091af73dd31067bd2c05;p=citadel.git diff --git a/citadel/sysdep.c b/citadel/sysdep.c index 12ef309cc..b89680c9e 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -84,7 +84,7 @@ struct igheap *igheap = NULL; #endif -pthread_key_t MyConKey; /* TSD key for MyContext() */ +citthread_key_t MyConKey; /* TSD key for MyContext() */ int verbosity = DEFAULT_VERBOSITY; /* Logging level */ @@ -216,7 +216,7 @@ void init_sysdep(void) { * CitContext structure (in the ContextList linked list) of the * session to which the calling thread is currently bound. */ - if (pthread_key_create(&MyConKey, NULL) != 0) { + if (citthread_key_create(&MyConKey, NULL) != 0) { CtdlLogPrintf(CTDL_CRIT, "Can't create TSD key: %s\n", strerror(errno)); } @@ -414,7 +414,7 @@ struct CitContext *MyContext(void) { register struct CitContext *c; - return ((c = (struct CitContext *) pthread_getspecific(MyConKey), + return ((c = (struct CitContext *) citthread_getspecific(MyConKey), c == NULL) ? &masterCC : c ); } @@ -1030,7 +1030,7 @@ void InitializeMasterCC(void) { * Bind a thread to a context. (It's inline merely to speed things up.) */ INLINE void become_session(struct CitContext *which_con) { - pthread_setspecific(MyConKey, (void *)which_con ); + citthread_setspecific(MyConKey, (void *)which_con ); }