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.c File Reference
#include <errno.h>
#include <stdio.h>
#include <syslog.h>
#include <libcitadel.h>
#include "modules_init.h"
#include "serv_extensions.h"
#include "ctdl_module.h"
#include "config.h"
#include "context.h"
#include "threads.h"
Include dependency graph for threads.c:

Go to the source code of this file.

Functions

void InitializeSemaphores (void)
 
void begin_critical_section (int which_one)
 
void end_critical_section (int which_one)
 
void CtdlThreadCreate (void *(*start_routine)(void *))
 
void go_threading (void)
 

Variables

int num_workers = 0
 
int active_workers = 0
 
pthread_mutex_t Critters [MAX_SEMAPHORES]
 
int server_shutting_down = 0
 
pthread_mutex_t ThreadCountMutex
 

Function Documentation

◆ begin_critical_section()

◆ CtdlThreadCreate()

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

Definition at line 69 of file threads.c.

References THREADSTACKSIZE.

Referenced by go_threading().

◆ end_critical_section()

◆ go_threading()

◆ InitializeSemaphores()

void InitializeSemaphores ( void )

Definition at line 25 of file threads.c.

References Critters, and MAX_SEMAPHORES.

Variable Documentation

◆ active_workers

int active_workers = 0

Definition at line 20 of file threads.c.

Referenced by go_threading(), and worker_thread().

◆ Critters

pthread_mutex_t Critters[MAX_SEMAPHORES]

Definition at line 21 of file threads.c.

Referenced by begin_critical_section(), end_critical_section(), and InitializeSemaphores().

◆ num_workers

int num_workers = 0

Definition at line 19 of file threads.c.

Referenced by go_threading(), and worker_thread().

◆ server_shutting_down

◆ ThreadCountMutex

pthread_mutex_t ThreadCountMutex

Definition at line 23 of file threads.c.

Referenced by go_threading(), and worker_thread().