Mercurial > hg > nginx
comparison src/core/ngx_hunk.c @ 132:949f45d1589a
nginx-0.0.1-2003-09-24-20:44:13 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 24 Sep 2003 16:44:13 +0000 |
parents | 7ebc8b7fb816 |
children | d57c6835225c |
comparison
equal
deleted
inserted
replaced
131:049e78b1f852 | 132:949f45d1589a |
---|---|
95 h->tag = 0; | 95 h->tag = 0; |
96 } | 96 } |
97 | 97 |
98 return h; | 98 return h; |
99 } | 99 } |
100 | |
101 | |
102 void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy, | |
103 ngx_chain_t **out) | |
104 { | |
105 ngx_chain_t *te; | |
106 | |
107 if (*busy == NULL) { | |
108 *busy = *out; | |
109 | |
110 } else { | |
111 for (te = *busy; /* void */ ; te = te->next) { | |
112 if (te->next == NULL) { | |
113 te->next = *out; | |
114 break; | |
115 } | |
116 } | |
117 } | |
118 | |
119 *out = NULL; | |
120 | |
121 while (*busy) { | |
122 if ((*busy)->hunk->pos != (*busy)->hunk->last) { | |
123 break; | |
124 } | |
125 | |
126 #if (HAVE_WRITE_ZEROCOPY) | |
127 if ((*busy)->hunk->type & NGX_HUNK_ZEROCOPY_BUSY) { | |
128 break; | |
129 } | |
130 #endif | |
131 | |
132 (*busy)->hunk->pos = (*busy)->hunk->last = (*busy)->hunk->start; | |
133 | |
134 te = *busy; | |
135 *busy = (*busy)->next; | |
136 te->next = *free; | |
137 *free = te; | |
138 } | |
139 } |