X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Finclude%2Fctdl_module.h;h=5dc418131b0aa86d392ddf61e4b2e3beda91c8cc;hb=bb4db7b4e2620965dd7a57984d8f7d07ca4b4806;hp=e5a544b73365ad9e73cb61311c1f59a3c192ffcf;hpb=ed4640564bf29690308619d12a11e7ad47d30bde;p=citadel.git diff --git a/citadel/include/ctdl_module.h b/citadel/include/ctdl_module.h index e5a544b73..5dc418131 100644 --- a/citadel/include/ctdl_module.h +++ b/citadel/include/ctdl_module.h @@ -138,5 +138,15 @@ void CtdlThreadAllocTSD(void); #define MYTID (((ThreadTSD*)pthread_getspecific(ThreadKey))->tid) #define CT (((ThreadTSD*)pthread_getspecific(ThreadKey))->self) +/** return the current context list as an array and do it in a safe manner + * The returned data is a copy so only reading is useful + * The number of contexts is returned in count. + * Beware, this does not copy any of the data pointed to by the context. + * This means that you can not rely on things like the redirect buffer being valid. + * You must free the returned pointer when done. + */ +struct CitContext *CtdlGetContextArray (int *count); + + #endif /* CTDL_MODULE_H */