Apache HTTPD
Classes | Macros | Functions | Variables
mpmt_os2.c File Reference
#include "ap_config.h"
#include "httpd.h"
#include "mpm_default.h"
#include "http_main.h"
#include "http_log.h"
#include "http_config.h"
#include "http_core.h"
#include "http_connection.h"
#include "ap_mpm.h"
#include "ap_listen.h"
#include "apr_portable.h"
#include "mpm_common.h"
#include "scoreboard.h"
#include "apr_strings.h"
#include <os2.h>
#include <process.h>

Go to the source code of this file.

Classes

struct  listen_socket_t
 
struct  parent_info_t
 

Macros

#define INCL_NOPMAPI
 
#define INCL_DOS
 
#define INCL_DOSERRORS
 
#define HARD_SERVER_LIMIT   10
 
#define HARD_THREAD_LIMIT   256
 

Functions

static int master_main ()
 
static void spawn_child (int slot)
 
void ap_mpm_child_main (apr_pool_t *pconf)
 
static void set_signals ()
 
static int mpmt_os2_run (apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
 
static void sig_term (int sig)
 
static void sig_restart (int sig)
 
static apr_status_t mpmt_os2_query (int query_code, int *result, apr_status_t *rv)
 
static const charmpmt_os2_get_name (void)
 
static int mpmt_os2_pre_config (apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
 
static int mpmt_os2_check_config (apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 
static void mpmt_os2_hooks (apr_pool_t *p)
 
static const charset_daemons_to_start (cmd_parms *cmd, void *dummy, const char *arg)
 
static const charset_min_spare_threads (cmd_parms *cmd, void *dummy, const char *arg)
 
static const charset_max_spare_threads (cmd_parms *cmd, void *dummy, const char *arg)
 
static const charignore_cmd (cmd_parms *cmd, void *dummy, const char *arg)
 

Variables

server_recap_server_conf
 
static apr_pool_tpconf = NULL
 
static int one_process = 0
 
static int ap_daemons_to_start = 0
 
static int ap_thread_limit = 0
 
int ap_min_spare_threads = 0
 
int ap_max_spare_threads = 0
 
int ap_max_daemons_limit = 0
 
static int volatile shutdown_pending
 
static int volatile restart_pending
 
static int volatile is_graceful = 0
 
ap_generation_t volatile ap_my_generation =0
 
static int is_parent_process = (! 0 )
 
HMTX ap_mpm_accept_mutex = 0
 
static const command_rec mpmt_os2_cmds []
 
static int *const aplog_module_index = &( mpm_mpmt_os2_module.module_index)
 

Macro Definition Documentation

◆ HARD_SERVER_LIMIT

#define HARD_SERVER_LIMIT   10

Definition at line 63 of file mpmt_os2.c.

◆ HARD_THREAD_LIMIT

#define HARD_THREAD_LIMIT   256

Definition at line 68 of file mpmt_os2.c.

◆ INCL_DOS

#define INCL_DOS

Definition at line 40 of file mpmt_os2.c.

◆ INCL_DOSERRORS

#define INCL_DOSERRORS

Definition at line 41 of file mpmt_os2.c.

◆ INCL_NOPMAPI

#define INCL_NOPMAPI

Definition at line 39 of file mpmt_os2.c.

Function Documentation

◆ ap_mpm_child_main()

void ap_mpm_child_main ( apr_pool_t pconf)

< Can read without blocking

Definition at line 93 of file mpmt_os2_child.c.

◆ ignore_cmd()

static const char * ignore_cmd ( cmd_parms cmd,
void *  dummy,
const char arg 
)
static

Definition at line 581 of file mpmt_os2.c.

◆ master_main()

static int master_main ( )
static

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has handled this stage.

< Module has served the response completely * - it's safe to die() with no more output

< Module has handled this stage.

< Module has served the response completely * - it's safe to die() with no more output

Definition at line 192 of file mpmt_os2.c.

◆ mpmt_os2_check_config()

static int mpmt_os2_check_config ( apr_pool_t p,
apr_pool_t plog,
apr_pool_t ptemp,
server_rec s 
)
static

< Module has handled this stage.

Definition at line 483 of file mpmt_os2.c.

◆ mpmt_os2_get_name()

static const char * mpmt_os2_get_name ( void  )
static

Definition at line 455 of file mpmt_os2.c.

◆ mpmt_os2_hooks()

static void mpmt_os2_hooks ( apr_pool_t p)
static

Definition at line 526 of file mpmt_os2.c.

◆ mpmt_os2_pre_config()

static int mpmt_os2_pre_config ( apr_pool_t pconf,
apr_pool_t plog,
apr_pool_t ptemp 
)
static

< Module has handled this stage.

Definition at line 465 of file mpmt_os2.c.

◆ mpmt_os2_query()

static apr_status_t mpmt_os2_query ( int  query_code,
int result,
apr_status_t rv 
)
static

< This value specifies that * an MPM is using a dynamic * number of threads or daemons

< This value specifies that an * MPM is not capable of * threading or forking.

< Module has handled this stage.

Definition at line 403 of file mpmt_os2.c.

◆ mpmt_os2_run()

static int mpmt_os2_run ( apr_pool_t _pconf,
apr_pool_t plog,
server_rec s 
)
static

< Module has served the response completely * - it's safe to die() with no more output

< Module has handled this stage.

< Module has handled this stage.

< Module has served the response completely * - it's safe to die() with no more output

< Module has handled this stage.

Definition at line 111 of file mpmt_os2.c.

◆ set_daemons_to_start()

static const char * set_daemons_to_start ( cmd_parms cmd,
void *  dummy,
const char arg 
)
static

< Forbidden in <VirtualHost>

< Forbidden in <Limit>

< Forbidden in <Directory>

< Forbidden in <Location>

< Forbidden in <Files> or <If>

< Forbidden in <Proxy>

Definition at line 537 of file mpmt_os2.c.

◆ set_max_spare_threads()

static const char * set_max_spare_threads ( cmd_parms cmd,
void *  dummy,
const char arg 
)
static

< Forbidden in <VirtualHost>

< Forbidden in <Limit>

< Forbidden in <Directory>

< Forbidden in <Location>

< Forbidden in <Files> or <If>

< Forbidden in <Proxy>

Definition at line 566 of file mpmt_os2.c.

◆ set_min_spare_threads()

static const char * set_min_spare_threads ( cmd_parms cmd,
void *  dummy,
const char arg 
)
static

< Forbidden in <VirtualHost>

< Forbidden in <Limit>

< Forbidden in <Directory>

< Forbidden in <Location>

< Forbidden in <Files> or <If>

< Forbidden in <Proxy>

Definition at line 551 of file mpmt_os2.c.

◆ set_signals()

static void set_signals ( void  )
static

Definition at line 377 of file mpmt_os2.c.

◆ sig_restart()

static void sig_restart ( int  sig)
static

Definition at line 366 of file mpmt_os2.c.

◆ sig_term()

static void sig_term ( int  sig)
static

Definition at line 358 of file mpmt_os2.c.

◆ spawn_child()

static void spawn_child ( int  slot)
static

Definition at line 327 of file mpmt_os2.c.

Variable Documentation

◆ ap_daemons_to_start

int ap_daemons_to_start = 0
static

Definition at line 76 of file mpmt_os2.c.

◆ ap_max_daemons_limit

int ap_max_daemons_limit = 0

Definition at line 82 of file mpmt_os2.c.

◆ ap_max_spare_threads

int ap_max_spare_threads = 0

Definition at line 79 of file mpmt_os2.c.

◆ ap_min_spare_threads

int ap_min_spare_threads = 0

Definition at line 78 of file mpmt_os2.c.

◆ ap_mpm_accept_mutex

HMTX ap_mpm_accept_mutex = 0

Definition at line 90 of file mpmt_os2.c.

◆ ap_my_generation

ap_generation_t volatile ap_my_generation =0

Definition at line 88 of file mpmt_os2.c.

◆ ap_thread_limit

int ap_thread_limit = 0
static

Definition at line 77 of file mpmt_os2.c.

◆ aplog_module_index

int* const aplog_module_index = &( mpm_mpmt_os2_module.module_index)
static

Definition at line 605 of file mpmt_os2.c.

◆ is_graceful

int volatile is_graceful = 0
static

Definition at line 87 of file mpmt_os2.c.

◆ is_parent_process

int is_parent_process = (! 0 )
static

Definition at line 89 of file mpmt_os2.c.

◆ mpmt_os2_cmds

const command_rec mpmt_os2_cmds[]
static
Initial value:
= {
{ "ListenBacklog" , ap_set_listenbacklog , NULL , 128 , TAKE1, "Maximum length of the queue of pending connections, as used by listen(2)" }, { "ListenCoresBucketsRatio" , ap_set_listencbratio , NULL , 128 , TAKE1, "Ratio between the number of CPU cores (online) and the number of listeners buckets" }, { "Listen" , ap_set_listener , NULL , 128 , TAKE_ARGV, "A port number or a numeric IP address and a port number, and an optional protocol" }, { "SendBufferSize" , ap_set_send_buffer_size , NULL , 128 , TAKE1, "Send buffer size in bytes" }, { "ReceiveBufferSize" , ap_set_receive_buffer_size , NULL , 128 , TAKE1, "Receive buffer size in bytes" } ,
{ "StartServers" , set_daemons_to_start , NULL , 128 , TAKE1, "Number of child processes launched at server startup" },
{ "MinSpareThreads" , set_min_spare_threads , NULL , 128 , TAKE1, "Minimum number of idle children, to handle request spikes" },
{ "MaxSpareThreads" , set_max_spare_threads , NULL , 128 , TAKE1, "Maximum number of idle children" },
{ "User" , ignore_cmd , NULL , 128 , TAKE1, "Not applicable on this platform" },
{ "Group" , ignore_cmd , NULL , 128 , TAKE1, "Not applicable on this platform" },
{ "ScoreBoardFile" , ignore_cmd , NULL , 128 , TAKE1, \ "Not applicable on this platform" },
{ NULL }
}
@ TAKE1
Definition http_config.h:51
@ TAKE_ARGV
Definition http_config.h:66
const char * ap_set_listenbacklog(cmd_parms *cmd, void *dummy, const char *arg)
Definition listen.c:901
const char * ap_set_send_buffer_size(cmd_parms *cmd, void *dummy, const char *arg)
Definition listen.c:941
const char * ap_set_listencbratio(cmd_parms *cmd, void *dummy, const char *arg)
Definition listen.c:921
const char * ap_set_listener(cmd_parms *cmd, void *dummy, int argc, char *const argv[])
Definition listen.c:847
const char * ap_set_receive_buffer_size(cmd_parms *cmd, void *dummy, const char *arg)
Definition listen.c:960
return NULL
Definition mod_so.c:359
static const char * ignore_cmd(cmd_parms *cmd, void *dummy, const char *arg)
Definition mpmt_os2.c:581
static const char * set_min_spare_threads(cmd_parms *cmd, void *dummy, const char *arg)
Definition mpmt_os2.c:551
static const char * set_max_spare_threads(cmd_parms *cmd, void *dummy, const char *arg)
Definition mpmt_os2.c:566
static const char * set_daemons_to_start(cmd_parms *cmd, void *dummy, const char *arg)
Definition mpmt_os2.c:537

Definition at line 588 of file mpmt_os2.c.

◆ one_process

int one_process = 0
static

Definition at line 75 of file mpmt_os2.c.

◆ pconf

apr_pool_t* pconf = NULL
static

Definition at line 72 of file mpmt_os2.c.

◆ restart_pending

int volatile restart_pending
static

Definition at line 86 of file mpmt_os2.c.

◆ shutdown_pending

int volatile shutdown_pending
static

Definition at line 85 of file mpmt_os2.c.