]> git.kaiwu.me - nginx.git/commitdiff
Removed ngx_connection_t.lock.
authorRuslan Ermilov <ru@nginx.com>
Fri, 20 Mar 2015 03:43:19 +0000 (06:43 +0300)
committerRuslan Ermilov <ru@nginx.com>
Fri, 20 Mar 2015 03:43:19 +0000 (06:43 +0300)
src/core/ngx_connection.c
src/core/ngx_connection.h
src/event/ngx_event.c
src/event/ngx_event_connect.h
src/http/ngx_http_upstream.c

index 896b775c56904caaf96f2853917a1750e58f439f..9152af3f70a3a6fa3eb387148927f311b772cc1c 100644 (file)
@@ -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);
     }
index 1867b4cbc27a5c9de6c9d271494821e3c8c45ab0..f1ca9619b5a758f18363618ca78a3eed15db28a4 100644 (file)
@@ -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
 };
 
 
index 885528aaea2c2841581b5b001f4677e12a1a9cd1..31514c44bd4e70bd2379834449390a42bd08b77a 100644 (file)
@@ -721,10 +721,6 @@ ngx_event_process_init(ngx_cycle_t *cycle)
         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;
index ab35836a2712bc1b5d7199b829c8aac253227264..ed18db7c319646c77ceb763661c0055a75a2b941 100644 (file)
@@ -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;
index fcff4a4c33a8dba8af5761b437754a8cb03a6ae5..3c2efadd6ba67c65d95fc88266aa8a1b6bb0664e 100644 (file)
@@ -446,9 +446,6 @@ ngx_http_upstream_create(ngx_http_request_t *r)
 
     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;