citadel
About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
  Fossies Dox: citadel.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Loading...
Searching...
No Matches
threads.h File Reference
#include "sysdep.h"
#include <pthread.h>
#include <sys/time.h>
#include <string.h>
#include <db.h>
#include "server.h"
#include "sysdep_decls.h"
Include dependency graph for threads.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  thread_tsd
 

Macros

#define TSD   MyThread()
 

Functions

struct thread_tsdMyThread (void)
 
int try_critical_section (int which_one)
 
void begin_critical_section (int which_one)
 
void end_critical_section (int which_one)
 
void go_threading (void)
 
void InitializeMasterTSD (void)
 
void CtdlThreadCreate (void *(*start_routine)(void *))
 

Variables

pthread_key_t ThreadKey
 
struct thread_tsd masterTSD
 
int num_workers
 
int active_workers
 
int server_shutting_down
 
pthread_mutex_t ThreadCountMutex
 

Macro Definition Documentation

◆ TSD

#define TSD   MyThread()

Definition at line 29 of file threads.h.

Function Documentation

◆ begin_critical_section()

◆ CtdlThreadCreate()

void CtdlThreadCreate ( void *(*)(void *)  start_routine)

Definition at line 121 of file threads.c.

References CTC_backend(), and THREADSTACKSIZE.

Referenced by go_threading().

◆ end_critical_section()

◆ go_threading()

◆ InitializeMasterTSD()

void InitializeMasterTSD ( void  )

Definition at line 134 of file threads.c.

References masterTSD.

Referenced by main().

◆ MyThread()

struct thread_tsd * MyThread ( void  )

Definition at line 89 of file threads.c.

References masterTSD, and ThreadKey.

◆ try_critical_section()

int try_critical_section ( int  which_one)

Definition at line 44 of file threads.c.

References cdb_check_handles(), Critters, S_FLOORCACHE, and S_NETCONFIGS.

Referenced by dead_session_purge().

Variable Documentation

◆ active_workers

int active_workers
extern

Definition at line 22 of file threads.c.

Referenced by go_threading(), and worker_thread().

◆ masterTSD

struct thread_tsd masterTSD
extern

Definition at line 25 of file threads.c.

Referenced by InitializeMasterTSD(), and MyThread().

◆ num_workers

int num_workers
extern

Definition at line 21 of file threads.c.

Referenced by go_threading(), and worker_thread().

◆ server_shutting_down

◆ ThreadCountMutex

pthread_mutex_t ThreadCountMutex
extern

Definition at line 27 of file threads.c.

Referenced by go_threading(), and worker_thread().

◆ ThreadKey

pthread_key_t ThreadKey
extern

Definition at line 23 of file threads.c.

Referenced by CTC_backend(), init_sysdep(), and MyThread().