Mercurial > hg > nginx
comparison src/core/ngx_cycle.c @ 6103:79ddb0bdb273
Upstream: the "zone" directive.
Upstreams with the "zone" directive are kept in shared memory,
with a consistent view of all worker processes.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 14 Apr 2015 19:01:25 +0300 |
parents | 457ec43dd8d5 |
children | 16c51e80128c |
comparison
equal
deleted
inserted
replaced
6102:3264b7828f72 | 6103:79ddb0bdb273 |
---|---|
439 { | 439 { |
440 continue; | 440 continue; |
441 } | 441 } |
442 | 442 |
443 if (shm_zone[i].tag == oshm_zone[n].tag | 443 if (shm_zone[i].tag == oshm_zone[n].tag |
444 && shm_zone[i].shm.size == oshm_zone[n].shm.size) | 444 && shm_zone[i].shm.size == oshm_zone[n].shm.size |
445 && !shm_zone[i].noreuse) | |
445 { | 446 { |
446 shm_zone[i].shm.addr = oshm_zone[n].shm.addr; | 447 shm_zone[i].shm.addr = oshm_zone[n].shm.addr; |
447 | 448 |
448 if (shm_zone[i].init(&shm_zone[i], oshm_zone[n].data) | 449 if (shm_zone[i].init(&shm_zone[i], oshm_zone[n].data) |
449 != NGX_OK) | 450 != NGX_OK) |
1232 shm_zone->shm.size = size; | 1233 shm_zone->shm.size = size; |
1233 shm_zone->shm.name = *name; | 1234 shm_zone->shm.name = *name; |
1234 shm_zone->shm.exists = 0; | 1235 shm_zone->shm.exists = 0; |
1235 shm_zone->init = NULL; | 1236 shm_zone->init = NULL; |
1236 shm_zone->tag = tag; | 1237 shm_zone->tag = tag; |
1238 shm_zone->noreuse = 0; | |
1237 | 1239 |
1238 return shm_zone; | 1240 return shm_zone; |
1239 } | 1241 } |
1240 | 1242 |
1241 | 1243 |