[nginx] Removed ngx_connection_t.lock.

Ruslan Ermilov ru at nginx.com
Fri Mar 20 03:46:44 UTC 2015


details:   http://hg.nginx.org/nginx/rev/c8acea7c7041
branches:  
changeset: 6031:c8acea7c7041
user:      Ruslan Ermilov <ru at nginx.com>
date:      Fri Mar 20 06:43:19 2015 +0300
description:
Removed ngx_connection_t.lock.

diffstat:

 src/core/ngx_connection.c     |  12 ------------
 src/core/ngx_connection.h     |   4 ----
 src/event/ngx_event.c         |   4 ----
 src/event/ngx_event_connect.h |   4 ----
 src/http/ngx_http_upstream.c  |   3 ---
 5 files changed, 0 insertions(+), 27 deletions(-)

diffs (77 lines):

diff -r 4652f8f26b12 -r c8acea7c7041 src/core/ngx_connection.c
--- a/src/core/ngx_connection.c	Fri Mar 20 06:43:19 2015 +0300
+++ b/src/core/ngx_connection.c	Fri Mar 20 06:43:19 2015 +0300
@@ -943,18 +943,6 @@ ngx_close_connection(ngx_connection_t *c
         }
     }
 
-#if (NGX_OLD_THREADS)
-
-    /*
-     * we have to clean the connection information before the closing
-     * because another thread may reopen the same file descriptor
-     * before we clean the connection
-     */
-
-    ngx_unlock(&c->lock);
-
-#endif
-
     if (c->read->posted) {
         ngx_delete_posted_event(c->read);
     }
diff -r 4652f8f26b12 -r c8acea7c7041 src/core/ngx_connection.h
--- a/src/core/ngx_connection.h	Fri Mar 20 06:43:19 2015 +0300
+++ b/src/core/ngx_connection.h	Fri Mar 20 06:43:19 2015 +0300
@@ -187,10 +187,6 @@ struct ngx_connection_s {
 #if (NGX_THREADS)
     ngx_thread_task_t  *sendfile_task;
 #endif
-
-#if (NGX_OLD_THREADS)
-    ngx_atomic_t        lock;
-#endif
 };
 
 
diff -r 4652f8f26b12 -r c8acea7c7041 src/event/ngx_event.c
--- a/src/event/ngx_event.c	Fri Mar 20 06:43:19 2015 +0300
+++ b/src/event/ngx_event.c	Fri Mar 20 06:43:19 2015 +0300
@@ -721,10 +721,6 @@ ngx_event_process_init(ngx_cycle_t *cycl
         c[i].fd = (ngx_socket_t) -1;
 
         next = &c[i];
-
-#if (NGX_OLD_THREADS)
-        c[i].lock = 0;
-#endif
     } while (i);
 
     cycle->free_connections = next;
diff -r 4652f8f26b12 -r c8acea7c7041 src/event/ngx_event_connect.h
--- a/src/event/ngx_event_connect.h	Fri Mar 20 06:43:19 2015 +0300
+++ b/src/event/ngx_event_connect.h	Fri Mar 20 06:43:19 2015 +0300
@@ -53,10 +53,6 @@ struct ngx_peer_connection_s {
     ngx_event_save_peer_session_pt   save_session;
 #endif
 
-#if (NGX_OLD_THREADS)
-    ngx_atomic_t                    *lock;
-#endif
-
     ngx_addr_t                      *local;
 
     int                              rcvbuf;
diff -r 4652f8f26b12 -r c8acea7c7041 src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c	Fri Mar 20 06:43:19 2015 +0300
+++ b/src/http/ngx_http_upstream.c	Fri Mar 20 06:43:19 2015 +0300
@@ -446,9 +446,6 @@ ngx_http_upstream_create(ngx_http_reques
 
     u->peer.log = r->connection->log;
     u->peer.log_error = NGX_ERROR_ERR;
-#if (NGX_OLD_THREADS)
-    u->peer.lock = &r->connection->lock;
-#endif
 
 #if (NGX_HTTP_CACHE)
     r->cache = NULL;



More information about the nginx-devel mailing list