mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
nginx-0.0.7-2004-06-16-23:36:07 import
This commit is contained in:
parent
2f65722941
commit
f924e6b694
8
src/core/ngx_slab.c
Normal file
8
src/core/ngx_slab.c
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
void *ngx_slab_alloc(ngx_slab_pool_t *pool, size_t size)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
37
src/core/ngx_slab.h
Normal file
37
src/core/ngx_slab.h
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#ifndef _NGX_SLAB_H_INCLUDED_
|
||||||
|
#define _NGX_SLAB_H_INCLUDED_
|
||||||
|
|
||||||
|
|
||||||
|
#include <ngx_config.h>
|
||||||
|
#include <ngx_core.h>
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct ngx_free_slab_s ngx_free_slab_t;
|
||||||
|
|
||||||
|
typedef struct ngx_free_slab_s {
|
||||||
|
ngx_free_slab_t *next;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct ngx_slab_block_s ngx_slab_block_t;
|
||||||
|
|
||||||
|
typedef struct ngx_slab_block_s {
|
||||||
|
ngx_free_slab_t *free;
|
||||||
|
ngx_slab_buf_t *next;
|
||||||
|
size_t color;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
ngx_slab_buf_t *blocks;
|
||||||
|
size_t size;
|
||||||
|
|
||||||
|
void *start;
|
||||||
|
uint32_t map;
|
||||||
|
|
||||||
|
ngx_log_t *log;
|
||||||
|
ngx_free_pool_t free;
|
||||||
|
} ngx_slab_pool_t;
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _NGX_SLAB_H_INCLUDED_ */
|
@ -655,12 +655,19 @@ static void ngx_channel_handler(ngx_event_t *ev)
|
|||||||
|
|
||||||
c = ev->data;
|
c = ev->data;
|
||||||
|
|
||||||
|
ngx_log_debug0(NGX_LOG_DEBUG_CORE, ev->log, 0, "channel handler");
|
||||||
|
|
||||||
n = ngx_read_channel(c->fd, &ch, sizeof(ngx_channel_t), ev->log);
|
n = ngx_read_channel(c->fd, &ch, sizeof(ngx_channel_t), ev->log);
|
||||||
|
|
||||||
|
ngx_log_debug1(NGX_LOG_DEBUG_CORE, ev->log, 0, "channel: %d", n);
|
||||||
|
|
||||||
if (n <= 0) {
|
if (n <= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngx_log_debug1(NGX_LOG_DEBUG_CORE, ev->log, 0,
|
||||||
|
"channel command: %d", ch.command);
|
||||||
|
|
||||||
switch (ch.command) {
|
switch (ch.command) {
|
||||||
|
|
||||||
case NGX_CMD_QUIT:
|
case NGX_CMD_QUIT:
|
||||||
|
Loading…
Reference in New Issue
Block a user