[nginx] Removed the obsolete rtsig module.
Ruslan Ermilov
ru at nginx.com
Thu Apr 23 11:18:18 UTC 2015
details: http://hg.nginx.org/nginx/rev/adba26ff70b5
branches:
changeset: 6126:adba26ff70b5
user: Ruslan Ermilov <ru at nginx.com>
date: Thu Apr 23 14:17:40 2015 +0300
description:
Removed the obsolete rtsig module.
diffstat:
auto/modules | 7 -
auto/options | 5 -
auto/os/linux | 12 -
auto/sources | 3 -
src/core/ngx_connection.c | 5 +-
src/core/ngx_resolver.c | 24 +-
src/event/modules/ngx_rtsig_module.c | 735 -----------------------------------
src/event/ngx_event.c | 58 +--
src/event/ngx_event.h | 10 +-
src/event/ngx_event_accept.c | 41 +-
src/http/ngx_http_request.c | 2 +-
src/os/unix/ngx_linux.h | 2 -
src/os/unix/ngx_linux_config.h | 6 -
src/os/unix/ngx_linux_init.c | 33 -
14 files changed, 28 insertions(+), 915 deletions(-)
diffs (truncated from 1220 to 300 lines):
diff -r 4dc8e7b62216 -r adba26ff70b5 auto/modules
--- a/auto/modules Wed Apr 22 18:57:32 2015 +0300
+++ b/auto/modules Thu Apr 23 14:17:40 2015 +0300
@@ -49,13 +49,6 @@ if [ $NGX_TEST_BUILD_EPOLL = YES ]; then
CORE_SRCS="$CORE_SRCS $EPOLL_SRCS"
fi
-if [ $NGX_TEST_BUILD_RTSIG = YES ]; then
- have=NGX_HAVE_RTSIG . auto/have
- have=NGX_TEST_BUILD_RTSIG . auto/have
- EVENT_MODULES="$EVENT_MODULES $RTSIG_MODULE"
- CORE_SRCS="$CORE_SRCS $RTSIG_SRCS"
-fi
-
if [ $NGX_TEST_BUILD_SOLARIS_SENDFILEV = YES ]; then
have=NGX_TEST_BUILD_SOLARIS_SENDFILEV . auto/have
CORE_SRCS="$CORE_SRCS $SOLARIS_SENDFILEV_SRCS"
diff -r 4dc8e7b62216 -r adba26ff70b5 auto/options
--- a/auto/options Wed Apr 22 18:57:32 2015 +0300
+++ b/auto/options Thu Apr 23 14:17:40 2015 +0300
@@ -30,7 +30,6 @@ NGX_RPATH=NO
NGX_TEST_BUILD_DEVPOLL=NO
NGX_TEST_BUILD_EVENTPORT=NO
NGX_TEST_BUILD_EPOLL=NO
-NGX_TEST_BUILD_RTSIG=NO
NGX_TEST_BUILD_SOLARIS_SENDFILEV=NO
NGX_PLATFORM=
@@ -38,7 +37,6 @@ NGX_WINE=
EVENT_FOUND=NO
-EVENT_RTSIG=NO
EVENT_SELECT=NO
EVENT_POLL=NO
@@ -189,7 +187,6 @@ do
--build=*) NGX_BUILD="$value" ;;
--builddir=*) NGX_OBJS="$value" ;;
- --with-rtsig_module) EVENT_RTSIG=YES ;;
--with-select_module) EVENT_SELECT=YES ;;
--without-select_module) EVENT_SELECT=NONE ;;
--with-poll_module) EVENT_POLL=YES ;;
@@ -327,7 +324,6 @@ use the \"--without-http_limit_conn_modu
--test-build-devpoll) NGX_TEST_BUILD_DEVPOLL=YES ;;
--test-build-eventport) NGX_TEST_BUILD_EVENTPORT=YES ;;
--test-build-epoll) NGX_TEST_BUILD_EPOLL=YES ;;
- --test-build-rtsig) NGX_TEST_BUILD_RTSIG=YES ;;
--test-build-solaris-sendfilev) NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
*)
@@ -362,7 +358,6 @@ cat << END
--build=NAME set build name
--builddir=DIR set build directory
- --with-rtsig_module enable rtsig module
--with-select_module enable select module
--without-select_module disable select module
--with-poll_module enable poll module
diff -r 4dc8e7b62216 -r adba26ff70b5 auto/os/linux
--- a/auto/os/linux Wed Apr 22 18:57:32 2015 +0300
+++ b/auto/os/linux Thu Apr 23 14:17:40 2015 +0300
@@ -26,18 +26,6 @@ version=$((`uname -r \
version=${version:-0}
-# enable the rt signals on Linux between 2.2.19 and 2.6.17
-
-if [ \( $version -ge 131603 -a $version -lt 132626 \) -o $EVENT_RTSIG = YES ]
-then
- echo " + rt signals found"
- have=NGX_HAVE_RTSIG . auto/have
- EVENT_MODULES="$EVENT_MODULES $RTSIG_MODULE"
- CORE_SRCS="$CORE_SRCS $RTSIG_SRCS"
- EVENT_FOUND=YES
-fi
-
-
# posix_fadvise64() had been implemented in 2.5.60
if [ $version -lt 132412 ]; then
diff -r 4dc8e7b62216 -r adba26ff70b5 auto/sources
--- a/auto/sources Wed Apr 22 18:57:32 2015 +0300
+++ b/auto/sources Thu Apr 23 14:17:40 2015 +0300
@@ -124,9 +124,6 @@ EVENTPORT_SRCS=src/event/modules/ngx_eve
EPOLL_MODULE=ngx_epoll_module
EPOLL_SRCS=src/event/modules/ngx_epoll_module.c
-RTSIG_MODULE=ngx_rtsig_module
-RTSIG_SRCS=src/event/modules/ngx_rtsig_module.c
-
IOCP_MODULE=ngx_iocp_module
IOCP_SRCS=src/event/modules/ngx_iocp_module.c
diff -r 4dc8e7b62216 -r adba26ff70b5 src/core/ngx_connection.c
--- a/src/core/ngx_connection.c Wed Apr 22 18:57:32 2015 +0300
+++ b/src/core/ngx_connection.c Thu Apr 23 14:17:40 2015 +0300
@@ -764,10 +764,7 @@ ngx_close_listening_sockets(ngx_cycle_t
if (c) {
if (c->read->active) {
- if (ngx_event_flags & NGX_USE_RTSIG_EVENT) {
- ngx_del_conn(c, NGX_CLOSE_EVENT);
-
- } else if (ngx_event_flags & NGX_USE_EPOLL_EVENT) {
+ if (ngx_event_flags & NGX_USE_EPOLL_EVENT) {
/*
* it seems that Linux-2.6.x OpenVZ sends events
diff -r 4dc8e7b62216 -r adba26ff70b5 src/core/ngx_resolver.c
--- a/src/core/ngx_resolver.c Wed Apr 22 18:57:32 2015 +0300
+++ b/src/core/ngx_resolver.c Thu Apr 23 14:17:40 2015 +0300
@@ -3104,23 +3104,13 @@ ngx_udp_connect(ngx_udp_connection_t *uc
/* UDP sockets are always ready to write */
wev->ready = 1;
- if (ngx_add_event) {
-
- event = (ngx_event_flags & NGX_USE_CLEAR_EVENT) ?
- /* kqueue, epoll */ NGX_CLEAR_EVENT:
- /* select, poll, /dev/poll */ NGX_LEVEL_EVENT;
- /* eventport event type has no meaning: oneshot only */
-
- if (ngx_add_event(rev, NGX_READ_EVENT, event) != NGX_OK) {
- goto failed;
- }
-
- } else {
- /* rtsig */
-
- if (ngx_add_conn(c) == NGX_ERROR) {
- goto failed;
- }
+ event = (ngx_event_flags & NGX_USE_CLEAR_EVENT) ?
+ /* kqueue, epoll */ NGX_CLEAR_EVENT:
+ /* select, poll, /dev/poll */ NGX_LEVEL_EVENT;
+ /* eventport event type has no meaning: oneshot only */
+
+ if (ngx_add_event(rev, NGX_READ_EVENT, event) != NGX_OK) {
+ goto failed;
}
return NGX_OK;
diff -r 4dc8e7b62216 -r adba26ff70b5 src/event/modules/ngx_rtsig_module.c
--- a/src/event/modules/ngx_rtsig_module.c Wed Apr 22 18:57:32 2015 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,735 +0,0 @@
-
-/*
- * Copyright (C) Igor Sysoev
- * Copyright (C) Nginx, Inc.
- */
-
-
-#include <ngx_config.h>
-#include <ngx_core.h>
-#include <ngx_event.h>
-
-
-#if (NGX_TEST_BUILD_RTSIG)
-
-#if (NGX_DARWIN)
-
-#define SIGRTMIN 33
-#define si_fd __pad[0]
-
-#else
-
-#ifdef SIGRTMIN
-#define si_fd _reason.__spare__.__spare2__[0]
-#else
-#define SIGRTMIN 33
-#define si_fd __spare__[0]
-#endif
-
-#endif
-
-#define F_SETSIG 10
-#define KERN_RTSIGNR 30
-#define KERN_RTSIGMAX 31
-
-int sigtimedwait(const sigset_t *set, siginfo_t *info,
- const struct timespec *timeout);
-
-int sigtimedwait(const sigset_t *set, siginfo_t *info,
- const struct timespec *timeout)
-{
- return -1;
-}
-
-int ngx_linux_rtsig_max;
-
-#endif
-
-
-typedef struct {
- ngx_uint_t signo;
- ngx_uint_t overflow_events;
- ngx_uint_t overflow_test;
- ngx_uint_t overflow_threshold;
-} ngx_rtsig_conf_t;
-
-
-extern ngx_event_module_t ngx_poll_module_ctx;
-
-static ngx_int_t ngx_rtsig_init(ngx_cycle_t *cycle, ngx_msec_t timer);
-static void ngx_rtsig_done(ngx_cycle_t *cycle);
-static ngx_int_t ngx_rtsig_add_connection(ngx_connection_t *c);
-static ngx_int_t ngx_rtsig_del_connection(ngx_connection_t *c,
- ngx_uint_t flags);
-static ngx_int_t ngx_rtsig_process_events(ngx_cycle_t *cycle,
- ngx_msec_t timer, ngx_uint_t flags);
-static ngx_int_t ngx_rtsig_process_overflow(ngx_cycle_t *cycle,
- ngx_msec_t timer, ngx_uint_t flags);
-
-static void *ngx_rtsig_create_conf(ngx_cycle_t *cycle);
-static char *ngx_rtsig_init_conf(ngx_cycle_t *cycle, void *conf);
-static char *ngx_check_ngx_overflow_threshold_bounds(ngx_conf_t *cf,
- void *post, void *data);
-
-
-static sigset_t set;
-static ngx_uint_t overflow, overflow_current;
-static struct pollfd *overflow_list;
-
-
-static ngx_str_t rtsig_name = ngx_string("rtsig");
-
-static ngx_conf_num_bounds_t ngx_overflow_threshold_bounds = {
- ngx_check_ngx_overflow_threshold_bounds, 2, 10
-};
-
-
-static ngx_command_t ngx_rtsig_commands[] = {
-
- { ngx_string("rtsig_signo"),
- NGX_EVENT_CONF|NGX_CONF_TAKE1,
- ngx_conf_set_num_slot,
- 0,
- offsetof(ngx_rtsig_conf_t, signo),
- NULL },
-
- { ngx_string("rtsig_overflow_events"),
- NGX_EVENT_CONF|NGX_CONF_TAKE1,
- ngx_conf_set_num_slot,
- 0,
- offsetof(ngx_rtsig_conf_t, overflow_events),
- NULL },
-
- { ngx_string("rtsig_overflow_test"),
- NGX_EVENT_CONF|NGX_CONF_TAKE1,
- ngx_conf_set_num_slot,
- 0,
- offsetof(ngx_rtsig_conf_t, overflow_test),
- NULL },
-
- { ngx_string("rtsig_overflow_threshold"),
- NGX_EVENT_CONF|NGX_CONF_TAKE1,
- ngx_conf_set_num_slot,
- 0,
- offsetof(ngx_rtsig_conf_t, overflow_threshold),
- &ngx_overflow_threshold_bounds },
-
- ngx_null_command
-};
-
-
-ngx_event_module_t ngx_rtsig_module_ctx = {
- &rtsig_name,
- ngx_rtsig_create_conf, /* create configuration */
- ngx_rtsig_init_conf, /* init configuration */
-
- {
- NULL, /* add an event */
- NULL, /* delete an event */
- NULL, /* enable an event */
- NULL, /* disable an event */
- ngx_rtsig_add_connection, /* add an connection */
- ngx_rtsig_del_connection, /* delete an connection */
- NULL, /* trigger a notify */
- ngx_rtsig_process_events, /* process the events */
- ngx_rtsig_init, /* init the events */
- ngx_rtsig_done, /* done the events */
- }
-
-};
-
-ngx_module_t ngx_rtsig_module = {
- NGX_MODULE_V1,
- &ngx_rtsig_module_ctx, /* module context */
- ngx_rtsig_commands, /* module directives */
- NGX_EVENT_MODULE, /* module type */
- NULL, /* init master */
- NULL, /* init module */
- NULL, /* init process */
- NULL, /* init thread */
- NULL, /* exit thread */
- NULL, /* exit process */
- NULL, /* exit master */
More information about the nginx-devel
mailing list