m 1417 core/ngx_conf_file.c ngx_uint_t *np, i, m; m 1427 core/ngx_conf_file.c for (m = 0; mask[m].name.len != 0; m++) { m 1429 core/ngx_conf_file.c if (mask[m].name.len != value[i].len m 1430 core/ngx_conf_file.c || ngx_strcasecmp(mask[m].name.data, value[i].data) != 0) m 1435 core/ngx_conf_file.c if (*np & mask[m].mask) { m 1440 core/ngx_conf_file.c *np |= mask[m].mask; m 1446 core/ngx_conf_file.c if (mask[m].name.len == 0) { m 118 core/ngx_palloc.c u_char *m; m 126 core/ngx_palloc.c m = ngx_align_ptr(p->d.last, NGX_ALIGNMENT); m 128 core/ngx_palloc.c if ((size_t) (p->d.end - m) >= size) { m 129 core/ngx_palloc.c p->d.last = m + size; m 131 core/ngx_palloc.c return m; m 148 core/ngx_palloc.c u_char *m; m 156 core/ngx_palloc.c m = p->d.last; m 158 core/ngx_palloc.c if ((size_t) (p->d.end - m) >= size) { m 159 core/ngx_palloc.c p->d.last = m + size; m 161 core/ngx_palloc.c return m; m 178 core/ngx_palloc.c u_char *m; m 184 core/ngx_palloc.c m = ngx_memalign(NGX_POOL_ALIGNMENT, psize, pool->log); m 185 core/ngx_palloc.c if (m == NULL) { m 189 core/ngx_palloc.c new = (ngx_pool_t *) m; m 191 core/ngx_palloc.c new->d.end = m + psize; m 195 core/ngx_palloc.c m += sizeof(ngx_pool_data_t); m 196 core/ngx_palloc.c m = ngx_align_ptr(m, NGX_ALIGNMENT); m 197 core/ngx_palloc.c new->d.last = m + size; m 211 core/ngx_palloc.c return m; m 80 core/ngx_slab.c ngx_int_t m; m 129 core/ngx_slab.c m = pages - (pool->end - pool->start) / ngx_pagesize; m 130 core/ngx_slab.c if (m > 0) { m 131 core/ngx_slab.c pages -= m; m 159 core/ngx_slab.c uintptr_t p, n, m, mask, *bitmap; m 213 core/ngx_slab.c for (m = 1, i = 0; m; m <<= 1, i++) { m 214 core/ngx_slab.c if ((bitmap[n] & m)) { m 218 core/ngx_slab.c bitmap[n] |= m; m 257 core/ngx_slab.c for (m = 1, i = 0; m; m <<= 1, i++) { m 258 core/ngx_slab.c if ((page->slab & m)) { m 262 core/ngx_slab.c page->slab |= m; m 296 core/ngx_slab.c for (m = (uintptr_t) 1 << NGX_SLAB_MAP_SHIFT, i = 0; m 297 core/ngx_slab.c m & mask; m 298 core/ngx_slab.c m <<= 1, i++) m 300 core/ngx_slab.c if ((page->slab & m)) { m 304 core/ngx_slab.c page->slab |= m; m 416 core/ngx_slab.c uintptr_t slab, m, *bitmap; m 444 core/ngx_slab.c m = (uintptr_t) 1 << (n & (sizeof(uintptr_t) * 8 - 1)); m 448 core/ngx_slab.c if (bitmap[n] & m) { m 462 core/ngx_slab.c bitmap[n] &= ~m; m 491 core/ngx_slab.c m = (uintptr_t) 1 << m 499 core/ngx_slab.c if (slab & m) { m 512 core/ngx_slab.c page->slab &= ~m; m 534 core/ngx_slab.c m = (uintptr_t) 1 << ((((uintptr_t) p & (ngx_pagesize - 1)) >> shift) m 537 core/ngx_slab.c if (slab & m) { m 551 core/ngx_slab.c page->slab &= ~m; m 799 core/ngx_string.c ngx_int_t m, z; m 810 core/ngx_string.c m = ngx_memcmp(s1, s2, n); m 812 core/ngx_string.c if (m || n1 == n2) { m 813 core/ngx_string.c return m; m 576 event/ngx_event.c ngx_uint_t m, i; m 607 event/ngx_event.c for (m = 0; ngx_modules[m]; m++) { m 608 event/ngx_event.c if (ngx_modules[m]->type != NGX_EVENT_MODULE) { m 612 event/ngx_event.c if (ngx_modules[m]->ctx_index != ecf->use) { m 616 event/ngx_event.c module = ngx_modules[m]->ctx; m 883 event/ngx_event.c ngx_event_module_t *m; m 913 event/ngx_event.c m = ngx_modules[i]->ctx; m 915 event/ngx_event.c if (m->create_conf) { m 916 event/ngx_event.c (*ctx)[ngx_modules[i]->ctx_index] = m->create_conf(cf->cycle); m 940 event/ngx_event.c m = ngx_modules[i]->ctx; m 942 event/ngx_event.c if (m->init_conf) { m 943 event/ngx_event.c rv = m->init_conf(cf->cycle, (*ctx)[ngx_modules[i]->ctx_index]); m 991 event/ngx_event.c ngx_int_t m; m 1010 event/ngx_event.c for (m = 0; ngx_modules[m]; m++) { m 1011 event/ngx_event.c if (ngx_modules[m]->type != NGX_EVENT_MODULE) { m 1015 event/ngx_event.c module = ngx_modules[m]->ctx; m 1018 event/ngx_event.c ecf->use = ngx_modules[m]->ctx_index; m 12 event/ngx_event_mutex.c ngx_int_t ngx_event_mutex_timedlock(ngx_event_mutex_t *m, ngx_msec_t timer, m 16 event/ngx_event_mutex.c "lock event mutex %p lock:%XD", m, m->lock); m 18 event/ngx_event_mutex.c if (m->lock) { m 20 event/ngx_event_mutex.c if (m->events == NULL) { m 21 event/ngx_event_mutex.c m->events = ev; m 24 event/ngx_event_mutex.c m->last->next = ev; m 27 event/ngx_event_mutex.c m->last = ev; m 39 event/ngx_event_mutex.c m->lock = 1; m 45 event/ngx_event_mutex.c ngx_int_t ngx_event_mutex_unlock(ngx_event_mutex_t *m, ngx_log_t *log) m 49 event/ngx_event_mutex.c if (m->lock == 0) { m 51 event/ngx_event_mutex.c "tring to unlock the free event mutex %p", m); m 56 event/ngx_event_mutex.c "unlock event mutex %p, next event: %p", m, m->events); m 58 event/ngx_event_mutex.c m->lock = 0; m 60 event/ngx_event_mutex.c if (m->events) { m 61 event/ngx_event_mutex.c ev = m->events; m 62 event/ngx_event_mutex.c m->events = ev->next; m 1571 http/modules/ngx_http_fastcgi_module.c u_char *m, *msg; m 1669 http/modules/ngx_http_fastcgi_module.c for (m = f->pos - 1; msg < m; m--) { m 1670 http/modules/ngx_http_fastcgi_module.c if (*m != LF && *m != CR && *m != '.' && *m != ' ') { m 1677 http/modules/ngx_http_fastcgi_module.c m + 1 - msg, msg); m 142 http/modules/ngx_http_upstream_ip_hash_module.c uintptr_t m; m 171 http/modules/ngx_http_upstream_ip_hash_module.c m = (uintptr_t) 1 << p % (8 * sizeof(uintptr_t)); m 173 http/modules/ngx_http_upstream_ip_hash_module.c if (!(iphp->rrp.tried[n] & m)) { m 176 http/modules/ngx_http_upstream_ip_hash_module.c "get ip hash peer, hash: %ui %04XA", p, m); m 194 http/modules/ngx_http_upstream_ip_hash_module.c iphp->rrp.tried[n] |= m; m 214 http/modules/ngx_http_upstream_ip_hash_module.c iphp->rrp.tried[n] |= m; m 455 http/modules/perl/ngx_http_perl_module.c ngx_str_t *m; m 475 http/modules/perl/ngx_http_perl_module.c m = ngx_array_push(pmcf->modules); m 476 http/modules/perl/ngx_http_perl_module.c if (m == NULL) { m 480 http/modules/perl/ngx_http_perl_module.c ngx_str_set(m, NGX_PERL_MODULES); m 485 http/modules/perl/ngx_http_perl_module.c m = pmcf->modules->elts; m 487 http/modules/perl/ngx_http_perl_module.c if (ngx_conf_full_name(cf->cycle, &m[i], 0) != NGX_OK) { m 550 http/modules/perl/ngx_http_perl_module.c ngx_str_t *m; m 587 http/modules/perl/ngx_http_perl_module.c m = pmcf->modules->elts; m 590 http/modules/perl/ngx_http_perl_module.c embedding[2 * i + 2] = (char *) m[i].data; m 121 http/ngx_http.c ngx_uint_t mi, m, s; m 142 http/ngx_http.c for (m = 0; ngx_modules[m]; m++) { m 143 http/ngx_http.c if (ngx_modules[m]->type != NGX_HTTP_MODULE) { m 147 http/ngx_http.c ngx_modules[m]->ctx_index = ngx_http_max_module++; m 187 http/ngx_http.c for (m = 0; ngx_modules[m]; m++) { m 188 http/ngx_http.c if (ngx_modules[m]->type != NGX_HTTP_MODULE) { m 192 http/ngx_http.c module = ngx_modules[m]->ctx; m 193 http/ngx_http.c mi = ngx_modules[m]->ctx_index; m 220 http/ngx_http.c for (m = 0; ngx_modules[m]; m++) { m 221 http/ngx_http.c if (ngx_modules[m]->type != NGX_HTTP_MODULE) { m 225 http/ngx_http.c module = ngx_modules[m]->ctx; m 252 http/ngx_http.c for (m = 0; ngx_modules[m]; m++) { m 253 http/ngx_http.c if (ngx_modules[m]->type != NGX_HTTP_MODULE) { m 257 http/ngx_http.c module = ngx_modules[m]->ctx; m 258 http/ngx_http.c mi = ngx_modules[m]->ctx_index; m 301 http/ngx_http.c for (m = 0; ngx_modules[m]; m++) { m 302 http/ngx_http.c if (ngx_modules[m]->type != NGX_HTTP_MODULE) { m 306 http/ngx_http.c module = ngx_modules[m]->ctx; m 123 http/ngx_http.h ngx_module_t *m, ngx_int_t error); m 37 http/ngx_http_parse.c #define ngx_str3_cmp(m, c0, c1, c2, c3) \ m 38 http/ngx_http_parse.c *(uint32_t *) m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0) m 40 http/ngx_http_parse.c #define ngx_str3Ocmp(m, c0, c1, c2, c3) \ m 41 http/ngx_http_parse.c *(uint32_t *) m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0) m 43 http/ngx_http_parse.c #define ngx_str4cmp(m, c0, c1, c2, c3) \ m 44 http/ngx_http_parse.c *(uint32_t *) m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0) m 46 http/ngx_http_parse.c #define ngx_str5cmp(m, c0, c1, c2, c3, c4) \ m 47 http/ngx_http_parse.c *(uint32_t *) m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0) \ m 48 http/ngx_http_parse.c && m[4] == c4 m 50 http/ngx_http_parse.c #define ngx_str6cmp(m, c0, c1, c2, c3, c4, c5) \ m 51 http/ngx_http_parse.c *(uint32_t *) m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0) \ m 52 http/ngx_http_parse.c && (((uint32_t *) m)[1] & 0xffff) == ((c5 << 8) | c4) m 54 http/ngx_http_parse.c #define ngx_str7_cmp(m, c0, c1, c2, c3, c4, c5, c6, c7) \ m 55 http/ngx_http_parse.c *(uint32_t *) m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0) \ m 56 http/ngx_http_parse.c && ((uint32_t *) m)[1] == ((c7 << 24) | (c6 << 16) | (c5 << 8) | c4) m 58 http/ngx_http_parse.c #define ngx_str8cmp(m, c0, c1, c2, c3, c4, c5, c6, c7) \ m 59 http/ngx_http_parse.c *(uint32_t *) m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0) \ m 60 http/ngx_http_parse.c && ((uint32_t *) m)[1] == ((c7 << 24) | (c6 << 16) | (c5 << 8) | c4) m 62 http/ngx_http_parse.c #define ngx_str9cmp(m, c0, c1, c2, c3, c4, c5, c6, c7, c8) \ m 63 http/ngx_http_parse.c *(uint32_t *) m == ((c3 << 24) | (c2 << 16) | (c1 << 8) | c0) \ m 64 http/ngx_http_parse.c && ((uint32_t *) m)[1] == ((c7 << 24) | (c6 << 16) | (c5 << 8) | c4) \ m 65 http/ngx_http_parse.c && m[8] == c8 m 69 http/ngx_http_parse.c #define ngx_str3_cmp(m, c0, c1, c2, c3) \ m 70 http/ngx_http_parse.c m[0] == c0 && m[1] == c1 && m[2] == c2 m 72 http/ngx_http_parse.c #define ngx_str3Ocmp(m, c0, c1, c2, c3) \ m 73 http/ngx_http_parse.c m[0] == c0 && m[2] == c2 && m[3] == c3 m 75 http/ngx_http_parse.c #define ngx_str4cmp(m, c0, c1, c2, c3) \ m 76 http/ngx_http_parse.c m[0] == c0 && m[1] == c1 && m[2] == c2 && m[3] == c3 m 78 http/ngx_http_parse.c #define ngx_str5cmp(m, c0, c1, c2, c3, c4) \ m 79 http/ngx_http_parse.c m[0] == c0 && m[1] == c1 && m[2] == c2 && m[3] == c3 && m[4] == c4 m 81 http/ngx_http_parse.c #define ngx_str6cmp(m, c0, c1, c2, c3, c4, c5) \ m 82 http/ngx_http_parse.c m[0] == c0 && m[1] == c1 && m[2] == c2 && m[3] == c3 \ m 83 http/ngx_http_parse.c && m[4] == c4 && m[5] == c5 m 85 http/ngx_http_parse.c #define ngx_str7_cmp(m, c0, c1, c2, c3, c4, c5, c6, c7) \ m 86 http/ngx_http_parse.c m[0] == c0 && m[1] == c1 && m[2] == c2 && m[3] == c3 \ m 87 http/ngx_http_parse.c && m[4] == c4 && m[5] == c5 && m[6] == c6 m 89 http/ngx_http_parse.c #define ngx_str8cmp(m, c0, c1, c2, c3, c4, c5, c6, c7) \ m 90 http/ngx_http_parse.c m[0] == c0 && m[1] == c1 && m[2] == c2 && m[3] == c3 \ m 91 http/ngx_http_parse.c && m[4] == c4 && m[5] == c5 && m[6] == c6 && m[7] == c7 m 93 http/ngx_http_parse.c #define ngx_str9cmp(m, c0, c1, c2, c3, c4, c5, c6, c7, c8) \ m 94 http/ngx_http_parse.c m[0] == c0 && m[1] == c1 && m[2] == c2 && m[3] == c3 \ m 95 http/ngx_http_parse.c && m[4] == c4 && m[5] == c5 && m[6] == c6 && m[7] == c7 && m[8] == c8 m 105 http/ngx_http_parse.c u_char c, ch, *p, *m; m 158 http/ngx_http_parse.c m = r->request_start; m 160 http/ngx_http_parse.c switch (p - m) { m 163 http/ngx_http_parse.c if (ngx_str3_cmp(m, 'G', 'E', 'T', ' ')) { m 168 http/ngx_http_parse.c if (ngx_str3_cmp(m, 'P', 'U', 'T', ' ')) { m 176 http/ngx_http_parse.c if (m[1] == 'O') { m 178 http/ngx_http_parse.c if (ngx_str3Ocmp(m, 'P', 'O', 'S', 'T')) { m 183 http/ngx_http_parse.c if (ngx_str3Ocmp(m, 'C', 'O', 'P', 'Y')) { m 188 http/ngx_http_parse.c if (ngx_str3Ocmp(m, 'M', 'O', 'V', 'E')) { m 193 http/ngx_http_parse.c if (ngx_str3Ocmp(m, 'L', 'O', 'C', 'K')) { m 200 http/ngx_http_parse.c if (ngx_str4cmp(m, 'H', 'E', 'A', 'D')) { m 209 http/ngx_http_parse.c if (ngx_str5cmp(m, 'M', 'K', 'C', 'O', 'L')) { m 213 http/ngx_http_parse.c if (ngx_str5cmp(m, 'P', 'A', 'T', 'C', 'H')) { m 217 http/ngx_http_parse.c if (ngx_str5cmp(m, 'T', 'R', 'A', 'C', 'E')) { m 224 http/ngx_http_parse.c if (ngx_str6cmp(m, 'D', 'E', 'L', 'E', 'T', 'E')) { m 229 http/ngx_http_parse.c if (ngx_str6cmp(m, 'U', 'N', 'L', 'O', 'C', 'K')) { m 237 http/ngx_http_parse.c if (ngx_str7_cmp(m, 'O', 'P', 'T', 'I', 'O', 'N', 'S', ' ')) m 245 http/ngx_http_parse.c if (ngx_str8cmp(m, 'P', 'R', 'O', 'P', 'F', 'I', 'N', 'D')) m 253 http/ngx_http_parse.c if (ngx_str9cmp(m, m 469 http/ngx_http_special_response.c ngx_http_filter_finalize_request(ngx_http_request_t *r, ngx_module_t *m, m 479 http/ngx_http_special_response.c if (m) { m 480 http/ngx_http_special_response.c ctx = r->ctx[m->ctx_index]; m 486 http/ngx_http_special_response.c if (m) { m 487 http/ngx_http_special_response.c r->ctx[m->ctx_index] = ctx; m 3950 http/ngx_http_upstream.c ngx_uint_t m; m 4000 http/ngx_http_upstream.c for (m = 0; ngx_modules[m]; m++) { m 4001 http/ngx_http_upstream.c if (ngx_modules[m]->type != NGX_HTTP_MODULE) { m 4005 http/ngx_http_upstream.c module = ngx_modules[m]->ctx; m 4013 http/ngx_http_upstream.c ctx->srv_conf[ngx_modules[m]->ctx_index] = mconf; m 4022 http/ngx_http_upstream.c ctx->loc_conf[ngx_modules[m]->ctx_index] = mconf; m 362 http/ngx_http_upstream_round_robin.c uintptr_t m; m 421 http/ngx_http_upstream_round_robin.c m = (uintptr_t) 1 << rrp->current % (8 * sizeof(uintptr_t)); m 423 http/ngx_http_upstream_round_robin.c if (!(rrp->tried[n] & m)) { m 442 http/ngx_http_upstream_round_robin.c rrp->tried[n] |= m; m 468 http/ngx_http_upstream_round_robin.c m = (uintptr_t) 1 << rrp->current % (8 * sizeof(uintptr_t)); m 470 http/ngx_http_upstream_round_robin.c if (!(rrp->tried[n] & m)) { m 490 http/ngx_http_upstream_round_robin.c rrp->tried[n] |= m; m 517 http/ngx_http_upstream_round_robin.c rrp->tried[n] |= m; m 76 mail/ngx_mail.c ngx_uint_t i, m, mi, s; m 103 mail/ngx_mail.c for (m = 0; ngx_modules[m]; m++) { m 104 mail/ngx_mail.c if (ngx_modules[m]->type != NGX_MAIL_MODULE) { m 108 mail/ngx_mail.c ngx_modules[m]->ctx_index = ngx_mail_max_module++; m 137 mail/ngx_mail.c for (m = 0; ngx_modules[m]; m++) { m 138 mail/ngx_mail.c if (ngx_modules[m]->type != NGX_MAIL_MODULE) { m 142 mail/ngx_mail.c module = ngx_modules[m]->ctx; m 143 mail/ngx_mail.c mi = ngx_modules[m]->ctx_index; m 181 mail/ngx_mail.c for (m = 0; ngx_modules[m]; m++) { m 182 mail/ngx_mail.c if (ngx_modules[m]->type != NGX_MAIL_MODULE) { m 186 mail/ngx_mail.c module = ngx_modules[m]->ctx; m 187 mail/ngx_mail.c mi = ngx_modules[m]->ctx_index; m 209 mail/ngx_mail_core_module.c ngx_uint_t m; m 231 mail/ngx_mail_core_module.c for (m = 0; ngx_modules[m]; m++) { m 232 mail/ngx_mail_core_module.c if (ngx_modules[m]->type != NGX_MAIL_MODULE) { m 236 mail/ngx_mail_core_module.c module = ngx_modules[m]->ctx; m 244 mail/ngx_mail_core_module.c ctx->srv_conf[ngx_modules[m]->ctx_index] = mconf; m 286 mail/ngx_mail_core_module.c ngx_uint_t i, m; m 370 mail/ngx_mail_core_module.c for (m = 0; ngx_modules[m]; m++) { m 371 mail/ngx_mail_core_module.c if (ngx_modules[m]->type != NGX_MAIL_MODULE) { m 375 mail/ngx_mail_core_module.c module = ngx_modules[m]->ctx; m 464 mail/ngx_mail_core_module.c ngx_uint_t m; m 469 mail/ngx_mail_core_module.c for (m = 0; ngx_modules[m]; m++) { m 470 mail/ngx_mail_core_module.c if (ngx_modules[m]->type != NGX_MAIL_MODULE) { m 474 mail/ngx_mail_core_module.c module = ngx_modules[m]->ctx; m 143 mail/ngx_mail_imap_module.c ngx_uint_t i, m; m 178 mail/ngx_mail_imap_module.c for (m = NGX_MAIL_AUTH_PLAIN_ENABLED, i = 0; m 179 mail/ngx_mail_imap_module.c m <= NGX_MAIL_AUTH_CRAM_MD5_ENABLED; m 180 mail/ngx_mail_imap_module.c m <<= 1, i++) m 182 mail/ngx_mail_imap_module.c if (m & conf->auth_methods) { m 204 mail/ngx_mail_imap_module.c for (m = NGX_MAIL_AUTH_PLAIN_ENABLED, i = 0; m 205 mail/ngx_mail_imap_module.c m <= NGX_MAIL_AUTH_CRAM_MD5_ENABLED; m 206 mail/ngx_mail_imap_module.c m <<= 1, i++) m 208 mail/ngx_mail_imap_module.c if (m & conf->auth_methods) { m 144 mail/ngx_mail_smtp_module.c ngx_uint_t i, m, auth_enabled; m 206 mail/ngx_mail_smtp_module.c for (m = NGX_MAIL_AUTH_PLAIN_ENABLED, i = 0; m 207 mail/ngx_mail_smtp_module.c m <= NGX_MAIL_AUTH_CRAM_MD5_ENABLED; m 208 mail/ngx_mail_smtp_module.c m <<= 1, i++) m 210 mail/ngx_mail_smtp_module.c if (m & conf->auth_methods) { m 249 mail/ngx_mail_smtp_module.c for (m = NGX_MAIL_AUTH_PLAIN_ENABLED, i = 0; m 250 mail/ngx_mail_smtp_module.c m <= NGX_MAIL_AUTH_CRAM_MD5_ENABLED; m 251 mail/ngx_mail_smtp_module.c m <<= 1, i++) m 253 mail/ngx_mail_smtp_module.c if (m & conf->auth_methods) { m 315 os/unix/ngx_freebsd_rfork_thread.c ngx_mutex_t *m; m 318 os/unix/ngx_freebsd_rfork_thread.c m = ngx_alloc(sizeof(ngx_mutex_t), log); m 319 os/unix/ngx_freebsd_rfork_thread.c if (m == NULL) { m 323 os/unix/ngx_freebsd_rfork_thread.c m->lock = 0; m 324 os/unix/ngx_freebsd_rfork_thread.c m->log = log; m 327 os/unix/ngx_freebsd_rfork_thread.c m->semid = -1; m 328 os/unix/ngx_freebsd_rfork_thread.c return m; m 331 os/unix/ngx_freebsd_rfork_thread.c m->semid = semget(IPC_PRIVATE, 1, SEM_R|SEM_A); m 332 os/unix/ngx_freebsd_rfork_thread.c if (m->semid == -1) { m 339 os/unix/ngx_freebsd_rfork_thread.c if (semctl(m->semid, 0, SETVAL, op) == -1) { m 342 os/unix/ngx_freebsd_rfork_thread.c if (semctl(m->semid, 0, IPC_RMID) == -1) { m 350 os/unix/ngx_freebsd_rfork_thread.c return m; m 355 os/unix/ngx_freebsd_rfork_thread.c ngx_mutex_destroy(ngx_mutex_t *m) m 357 os/unix/ngx_freebsd_rfork_thread.c if (semctl(m->semid, 0, IPC_RMID) == -1) { m 358 os/unix/ngx_freebsd_rfork_thread.c ngx_log_error(NGX_LOG_ALERT, m->log, ngx_errno, m 362 os/unix/ngx_freebsd_rfork_thread.c ngx_free((void *) m); m 367 os/unix/ngx_freebsd_rfork_thread.c ngx_mutex_dolock(ngx_mutex_t *m, ngx_int_t try) m 379 os/unix/ngx_freebsd_rfork_thread.c ngx_log_debug2(NGX_LOG_DEBUG_MUTEX, m->log, 0, m 380 os/unix/ngx_freebsd_rfork_thread.c "try lock mutex %p lock:%XD", m, m->lock); m 382 os/unix/ngx_freebsd_rfork_thread.c ngx_log_debug2(NGX_LOG_DEBUG_MUTEX, m->log, 0, m 383 os/unix/ngx_freebsd_rfork_thread.c "lock mutex %p lock:%XD", m, m->lock); m 387 os/unix/ngx_freebsd_rfork_thread.c old = m->lock; m 401 os/unix/ngx_freebsd_rfork_thread.c old = m->lock; m 405 os/unix/ngx_freebsd_rfork_thread.c if (m->semid == -1) { m 409 os/unix/ngx_freebsd_rfork_thread.c old = m->lock; m 413 os/unix/ngx_freebsd_rfork_thread.c ngx_log_debug2(NGX_LOG_DEBUG_MUTEX, m->log, 0, m 414 os/unix/ngx_freebsd_rfork_thread.c "mutex %p lock:%XD", m, m->lock); m 424 os/unix/ngx_freebsd_rfork_thread.c ngx_log_error(NGX_LOG_ALERT, m->log, ngx_errno, m 427 os/unix/ngx_freebsd_rfork_thread.c lock & ~NGX_MUTEX_LOCK_BUSY, m, nthreads); m 431 os/unix/ngx_freebsd_rfork_thread.c if (ngx_atomic_cmp_set(&m->lock, old, lock)) { m 433 os/unix/ngx_freebsd_rfork_thread.c ngx_log_debug2(NGX_LOG_DEBUG_MUTEX, m->log, 0, m 434 os/unix/ngx_freebsd_rfork_thread.c "wait mutex %p lock:%XD", m, m->lock); m 447 os/unix/ngx_freebsd_rfork_thread.c if (semop(m->semid, &op, 1) == -1) { m 448 os/unix/ngx_freebsd_rfork_thread.c ngx_log_error(NGX_LOG_ALERT, m->log, ngx_errno, m 449 os/unix/ngx_freebsd_rfork_thread.c "semop() failed while waiting on mutex %p", m); m 453 os/unix/ngx_freebsd_rfork_thread.c ngx_log_debug2(NGX_LOG_DEBUG_MUTEX, m->log, 0, m 454 os/unix/ngx_freebsd_rfork_thread.c "mutex waked up %p lock:%XD", m, m->lock); m 457 os/unix/ngx_freebsd_rfork_thread.c old = m->lock; m 461 os/unix/ngx_freebsd_rfork_thread.c old = m->lock; m 466 os/unix/ngx_freebsd_rfork_thread.c if (ngx_atomic_cmp_set(&m->lock, old, lock)) { m 473 os/unix/ngx_freebsd_rfork_thread.c old = m->lock; m 478 os/unix/ngx_freebsd_rfork_thread.c ngx_log_debug1(NGX_LOG_DEBUG_MUTEX, m->log, 0, m 479 os/unix/ngx_freebsd_rfork_thread.c "mutex %p is contested", m); m 486 os/unix/ngx_freebsd_rfork_thread.c old = m->lock; m 490 os/unix/ngx_freebsd_rfork_thread.c ngx_log_debug2(NGX_LOG_DEBUG_MUTEX, m->log, 0, m 491 os/unix/ngx_freebsd_rfork_thread.c "mutex %p is locked, lock:%XD", m, m->lock); m 498 os/unix/ngx_freebsd_rfork_thread.c ngx_mutex_unlock(ngx_mutex_t *m) m 507 os/unix/ngx_freebsd_rfork_thread.c old = m->lock; m 510 os/unix/ngx_freebsd_rfork_thread.c ngx_log_error(NGX_LOG_ALERT, m->log, 0, m 511 os/unix/ngx_freebsd_rfork_thread.c "trying to unlock the free mutex %p", m); m 518 os/unix/ngx_freebsd_rfork_thread.c ngx_log_debug2(NGX_LOG_DEBUG_MUTEX, m->log, 0, m 519 os/unix/ngx_freebsd_rfork_thread.c "unlock mutex %p lock:%XD", m, old); m 525 os/unix/ngx_freebsd_rfork_thread.c if (ngx_atomic_cmp_set(&m->lock, old, lock)) { m 529 os/unix/ngx_freebsd_rfork_thread.c old = m->lock; m 532 os/unix/ngx_freebsd_rfork_thread.c if (m->semid == -1) { m 533 os/unix/ngx_freebsd_rfork_thread.c ngx_log_debug1(NGX_LOG_DEBUG_MUTEX, m->log, 0, m 534 os/unix/ngx_freebsd_rfork_thread.c "mutex %p is unlocked", m); m 541 os/unix/ngx_freebsd_rfork_thread.c old = m->lock; m 559 os/unix/ngx_freebsd_rfork_thread.c if (ngx_atomic_cmp_set(&m->lock, old, lock)) { m 563 os/unix/ngx_freebsd_rfork_thread.c ngx_log_debug1(NGX_LOG_DEBUG_MUTEX, m->log, 0, m 564 os/unix/ngx_freebsd_rfork_thread.c "wake up mutex %p", m); m 570 os/unix/ngx_freebsd_rfork_thread.c if (semop(m->semid, &op, 1) == -1) { m 571 os/unix/ngx_freebsd_rfork_thread.c ngx_log_error(NGX_LOG_ALERT, m->log, ngx_errno, m 572 os/unix/ngx_freebsd_rfork_thread.c "semop() failed while waking up on mutex %p", m); m 579 os/unix/ngx_freebsd_rfork_thread.c old = m->lock; m 582 os/unix/ngx_freebsd_rfork_thread.c ngx_log_debug1(NGX_LOG_DEBUG_MUTEX, m->log, 0, m 583 os/unix/ngx_freebsd_rfork_thread.c "mutex %p is unlocked", m); m 621 os/unix/ngx_freebsd_rfork_thread.c ngx_cond_wait(ngx_cond_t *cv, ngx_mutex_t *m) m 665 os/unix/ngx_freebsd_rfork_thread.c ngx_mutex_unlock(m); m 719 os/unix/ngx_freebsd_rfork_thread.c ngx_mutex_lock(m); m 112 os/unix/ngx_freebsd_rfork_thread.h #define ngx_mutex_trylock(m) ngx_mutex_dolock(m, 1) m 113 os/unix/ngx_freebsd_rfork_thread.h #define ngx_mutex_lock(m) (void) ngx_mutex_dolock(m, 0) m 114 os/unix/ngx_freebsd_rfork_thread.h ngx_int_t ngx_mutex_dolock(ngx_mutex_t *m, ngx_int_t try); m 115 os/unix/ngx_freebsd_rfork_thread.h void ngx_mutex_unlock(ngx_mutex_t *m); m 79 os/unix/ngx_pthread_thread.c ngx_mutex_t *m; m 81 os/unix/ngx_pthread_thread.c m = ngx_alloc(sizeof(ngx_mutex_t), log); m 82 os/unix/ngx_pthread_thread.c if (m == NULL) { m 86 os/unix/ngx_pthread_thread.c m->log = log; m 88 os/unix/ngx_pthread_thread.c err = pthread_mutex_init(&m->mutex, NULL); m 91 os/unix/ngx_pthread_thread.c ngx_log_error(NGX_LOG_ALERT, m->log, err, m 96 os/unix/ngx_pthread_thread.c return m; m 101 os/unix/ngx_pthread_thread.c ngx_mutex_destroy(ngx_mutex_t *m) m 105 os/unix/ngx_pthread_thread.c err = pthread_mutex_destroy(&m->mutex); m 108 os/unix/ngx_pthread_thread.c ngx_log_error(NGX_LOG_ALERT, m->log, err, m 109 os/unix/ngx_pthread_thread.c "pthread_mutex_destroy(%p) failed", m); m 112 os/unix/ngx_pthread_thread.c ngx_free(m); m 117 os/unix/ngx_pthread_thread.c ngx_mutex_lock(ngx_mutex_t *m) m 125 os/unix/ngx_pthread_thread.c ngx_log_debug1(NGX_LOG_DEBUG_MUTEX, m->log, 0, "lock mutex %p", m); m 127 os/unix/ngx_pthread_thread.c err = pthread_mutex_lock(&m->mutex); m 130 os/unix/ngx_pthread_thread.c ngx_log_error(NGX_LOG_ALERT, m->log, err, m 131 os/unix/ngx_pthread_thread.c "pthread_mutex_lock(%p) failed", m); m 135 os/unix/ngx_pthread_thread.c ngx_log_debug1(NGX_LOG_DEBUG_MUTEX, m->log, 0, "mutex %p is locked", m); m 142 os/unix/ngx_pthread_thread.c ngx_mutex_trylock(ngx_mutex_t *m) m 150 os/unix/ngx_pthread_thread.c ngx_log_debug1(NGX_LOG_DEBUG_MUTEX, m->log, 0, "try lock mutex %p", m); m 152 os/unix/ngx_pthread_thread.c err = pthread_mutex_trylock(&m->mutex); m 159 os/unix/ngx_pthread_thread.c ngx_log_error(NGX_LOG_ALERT, m->log, err, m 160 os/unix/ngx_pthread_thread.c "pthread_mutex_trylock(%p) failed", m); m 164 os/unix/ngx_pthread_thread.c ngx_log_debug1(NGX_LOG_DEBUG_MUTEX, m->log, 0, "mutex %p is locked", m); m 171 os/unix/ngx_pthread_thread.c ngx_mutex_unlock(ngx_mutex_t *m) m 179 os/unix/ngx_pthread_thread.c ngx_log_debug1(NGX_LOG_DEBUG_MUTEX, m->log, 0, "unlock mutex %p", m); m 181 os/unix/ngx_pthread_thread.c err = pthread_mutex_unlock(&m->mutex); m 184 os/unix/ngx_pthread_thread.c ngx_log_error(NGX_LOG_ALERT, m->log, err, m 185 os/unix/ngx_pthread_thread.c "pthread_mutex_unlock(%p) failed", m); m 189 os/unix/ngx_pthread_thread.c ngx_log_debug1(NGX_LOG_DEBUG_MUTEX, m->log, 0, "mutex %p is unlocked", m); m 237 os/unix/ngx_pthread_thread.c ngx_cond_wait(ngx_cond_t *cv, ngx_mutex_t *m) m 243 os/unix/ngx_pthread_thread.c err = pthread_cond_wait(&cv->cond, &m->mutex); m 253 os/unix/ngx_pthread_thread.c ngx_log_debug1(NGX_LOG_DEBUG_MUTEX, m->log, 0, "mutex %p is locked", m); m 68 os/unix/ngx_thread.h ngx_int_t ngx_mutex_trylock(ngx_mutex_t *m); m 69 os/unix/ngx_thread.h void ngx_mutex_lock(ngx_mutex_t *m); m 70 os/unix/ngx_thread.h void ngx_mutex_unlock(ngx_mutex_t *m); m 100 os/unix/ngx_thread.h void ngx_mutex_destroy(ngx_mutex_t *m); m 105 os/unix/ngx_thread.h ngx_int_t ngx_cond_wait(ngx_cond_t *cv, ngx_mutex_t *m); m 116 os/unix/ngx_thread.h #define ngx_mutex_trylock(m) NGX_OK m 117 os/unix/ngx_thread.h #define ngx_mutex_lock(m) m 118 os/unix/ngx_thread.h #define ngx_mutex_unlock(m)