static void
ngx_http_limit_zone_cleanup(void *data)
{
    ngx_http_limit_zone_cleanup_t  *lzcln = data;
    ngx_slab_pool_t             *shpool;
    ngx_rbtree_node_t           *node;
    ngx_http_limit_zone_ctx_t   *ctx;
    ngx_http_limit_zone_node_t  *lz;
    ctx = lzcln->shm_zone->data;
    shpool = (ngx_slab_pool_t *) lzcln->shm_zone->shm.addr;
    node = lzcln->node;
    lz = (ngx_http_limit_zone_node_t *) &node->color;
    ngx_shmtx_lock(&shpool->mutex);
    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, lzcln->shm_zone->shm.log, 0,
                   "limit zone cleanup: %08XD %d", node->key, lz->conn);
    lz->conn--;
    if (lz->conn == 0) {
        ngx_rbtree_delete(ctx->rbtree, node);
        ngx_slab_free_locked(shpool, node);
    }
    ngx_shmtx_unlock(&shpool->mutex);
}
['static void\nngx_http_limit_zone_cleanup(void *data)\n{\n    ngx_http_limit_zone_cleanup_t  *lzcln = data;\n    ngx_slab_pool_t             *shpool;\n    ngx_rbtree_node_t           *node;\n    ngx_http_limit_zone_ctx_t   *ctx;\n    ngx_http_limit_zone_node_t  *lz;\n    ctx = lzcln->shm_zone->data;\n    shpool = (ngx_slab_pool_t *) lzcln->shm_zone->shm.addr;\n    node = lzcln->node;\n    lz = (ngx_http_limit_zone_node_t *) &node->color;\n    ngx_shmtx_lock(&shpool->mutex);\n    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, lzcln->shm_zone->shm.log, 0,\n                   "limit zone cleanup: %08XD %d", node->key, lz->conn);\n    lz->conn--;\n    if (lz->conn == 0) {\n        ngx_rbtree_delete(ctx->rbtree, node);\n        ngx_slab_free_locked(shpool, node);\n    }\n    ngx_shmtx_unlock(&shpool->mutex);\n}', 'void\nngx_spinlock(ngx_atomic_t *lock, ngx_atomic_int_t value, ngx_uint_t spin)\n{\n#if (NGX_HAVE_ATOMIC_OPS)\n    ngx_uint_t  i, n;\n    for ( ;; ) {\n        if (*lock == 0 && ngx_atomic_cmp_set(lock, 0, value)) {\n            return;\n        }\n        if (ngx_ncpu > 1) {\n            for (n = 1; n < spin; n <<= 1) {\n                for (i = 0; i < n; i++) {\n                    ngx_cpu_pause();\n                }\n                if (*lock == 0 && ngx_atomic_cmp_set(lock, 0, value)) {\n                    return;\n                }\n            }\n        }\n        ngx_sched_yield();\n    }\n#else\n#if (NGX_THREADS)\n#error ngx_spinlock() or ngx_atomic_cmp_set() are not defined !\n#endif\n#endif\n}']