Searched refs:head (Results 1 - 25 of 39) sorted by relevance

12

/dovecot/src/lib/
H A Dtest-llist.c13 struct dllist *head = NULL, *l4, *l3, *l2, *l1; local
22 DLLIST_PREPEND(&head, l4);
23 test_assert(head == l4);
25 DLLIST_PREPEND(&head, l3);
26 test_assert(head == l3);
29 DLLIST_PREPEND(&head, l2);
30 DLLIST_PREPEND(&head, l1);
32 DLLIST_REMOVE(&head, l2);
34 test_assert(head == l1);
38 /* remove from head */
66 struct dllist *head = NULL, *tail = NULL, *l4, *l3, *l2, *l1; local
[all...]
H A Daqueue.c31 i_assert(aqueue->full && aqueue->head == aqueue->tail);
39 count = I_MIN(aqueue->area_size - orig_area_size, aqueue->head);
42 aqueue->head = orig_area_size + count;
45 aqueue->head - count);
46 aqueue->head -= count;
49 i_assert(aqueue->head != aqueue->tail);
60 array_idx_set_i(aqueue->arr, aqueue->head, data);
61 aqueue->head = (aqueue->head + 1) % aqueue->area_size;
62 aqueue->full = aqueue->head
[all...]
H A Dllist.h30 /* Doubly linked list with head and tail */
31 #define DLLIST2_PREPEND_FULL(head, tail, item, prev, next) STMT_START { \
33 (item)->next = *(head); \
34 if (*(head) != NULL) (*(head))->prev = (item); else (*tail) = (item); \
35 *(head) = (item); \
38 #define DLLIST2_PREPEND(head, tail, item) \
39 DLLIST2_PREPEND_FULL(head, tail, item, prev, next)
41 #define DLLIST2_APPEND_FULL(head, tail, item, prev, next) STMT_START { \
44 if (*(tail) != NULL) (*(tail))->next = (item); else (*head)
[all...]
H A Daqueue.h15 unsigned int head, tail, area_size; member in struct:aqueue
22 /* Append item to head */
H A Dostream-file.c26 ((fstream)->head == (fstream)->tail && !(fstream)->full)
67 if (fstream->head == fstream->tail)
69 else if (fstream->head < fstream->tail) {
71 return fstream->tail - fstream->head;
75 (fstream->buffer_size - fstream->head);
86 if (fstream->head < fstream->tail) {
88 used = fstream->tail - fstream->head;
90 fstream->head += size;
93 used = fstream->buffer_size - fstream->head;
97 fstream->head
[all...]
H A Distream-chain.c18 struct istream_chain_link *head, *tail; member in struct:istream_chain
52 if (chain->head == NULL && stream != NULL) {
65 DLLIST2_APPEND(&chain->head, &chain->tail, link);
87 struct istream_chain_link *link = cstream->chain.head;
101 struct istream_chain_link *link = cstream->chain.head;
115 struct istream_chain_link *link = cstream->chain.head;
126 DLLIST2_REMOVE(&cstream->chain.head, &cstream->chain.tail, link);
131 link = cstream->chain.head;
167 struct istream_chain_link *link = cstream->chain.head;
199 struct istream_chain_link *link = cstream->chain.head;
[all...]
H A Dostream-file-private.h20 size_t head, tail; /* first unsent/unused byte */ member in struct:file_ostream
22 bool full:1; /* if head == tail, is buffer empty or full? */
H A Dhook-build.c27 struct hook_stack *head, *tail; member in struct:hook_build_context
37 DLLIST2_APPEND(&ctx->head, &ctx->tail, stack);
H A Dtest-aqueue.c35 aqueue->head = aqueue->tail = initial_size - 1;
/dovecot/src/lib-index/
H A Dmail-transaction-log.c20 i_assert(log->head != file);
23 log->head = file;
144 if (log->head != NULL)
145 log->head->refcount--;
180 if (log->head != NULL)
181 return mail_transaction_log_file_move_to_memory(log->head);
203 if (log->head != NULL &&
204 log->head->hdr.indexid != log->index->indexid) {
205 if (--log->head->refcount == 0)
206 mail_transaction_log_file_free(&log->head);
[all...]
H A Dmail-transaction-log-view-private.h19 struct mail_transaction_log_file *cur, *head, *tail; member in struct:mail_transaction_log_view
H A Dtest-mail-index-modseq.c58 test_assert(mail_transaction_log_file_lock(index->log->head) == 0);
60 mail_transaction_log_file_unlock(index->log->head, "rotating");
H A Dmail-transaction-log-append.c35 MAIL_TRANSACTION_LOG_HDR_VERSION(&ctx->log->head->hdr));
42 struct mail_transaction_log_file *file = ctx->log->head;
64 struct mail_transaction_log_file *file = ctx->log->head;
119 struct mail_transaction_log_file *file = ctx->log->head;
178 struct mail_transaction_log_file *file = ctx->log->head;
251 mail_transaction_log_file_unlock(index->log->head, "appending");
H A Dmail-transaction-log-view.c18 i_assert(view->log->head != NULL);
20 view->head = view->tail = view->log->head;
21 view->head->refcount++;
23 array_append(&view->file_refs, &view->head, 1);
157 view->tail = view->head = file = NULL;
187 view->head == view->log->head) {
220 view->head = file;
244 if (max_file_offset < view->head
[all...]
H A Dtest-mail-transaction-log-append.c45 struct mail_transaction_log_file *file = log->head;
94 struct mail_transaction_log_file *file = log->head;
136 log->head = file = i_new(struct mail_transaction_log_file, 1);
149 /* do this after head->buffer has already been initialized */
162 buffer_free(&log->head->buffer);
163 i_free(log->head);
H A Dmail-index-write.c132 hdr->log_file_seq == index->log->head->hdr.file_seq &&
136 index->log->head;
H A Dmail-transaction-log-private.h84 them easily. head contains a pointer to the newest log file. */
85 struct mail_transaction_log_file *files, *head; member in struct:mail_transaction_log
H A Dtest-mail-transaction-log-view.c90 log->head = file;
154 add_append_record(log->head, &append_rec);
/dovecot/src/director/
H A Duser-directory.c27 struct user *head, *tail; member in struct:user_directory
66 DLLIST2_REMOVE(&dir->head, &dir->tail, user);
105 while (dir->head != NULL &&
106 !user_directory_user_has_connections(dir, dir->head, &expire_timestamp)) {
107 user_free(dir, dir->head);
158 DLLIST2_APPEND(&dir->head, &dir->tail, user);
174 DLLIST2_REMOVE(&dir->head, &dir->tail, user);
175 DLLIST2_APPEND(&dir->head, &dir->tail, user);
183 for (user = dir->head; user != NULL; user = next) {
210 i_assert(dir->head
[all...]
/dovecot/src/log/
H A Dlog-error-buffer.c17 struct log_error_data *head, *tail; member in struct:log_error_buffer
39 i_assert(buf->head != NULL);
42 data = buf->head;
43 buf->head = data->next;
72 buf->head = data;
94 iter->cur = buf->head;
/dovecot/src/indexer/
H A Dindexer-queue.c15 struct indexer_request *head, *tail; member in struct:indexer_queue
116 DLLIST2_REMOVE(&queue->head, &queue->tail, request);
120 DLLIST2_APPEND(&queue->head, &queue->tail, request);
122 DLLIST2_PREPEND(&queue->head, &queue->tail, request);
161 return queue->head;
166 struct indexer_request *request = queue->head;
170 DLLIST2_REMOVE(&queue->head, &queue->tail, request);
223 DLLIST2_PREPEND(&queue->head, &queue->tail, request);
225 DLLIST2_APPEND(&queue->head, &queue->tail, request);
260 return queue->head
[all...]
/dovecot/src/lib-dns/
H A Ddns-lookup.c48 struct dns_lookup *head, *tail; member in struct:dns_client
73 lookup = client->head;
74 client->head = NULL;
142 struct dns_lookup *lookup = client->head;
225 i_assert(client->head == NULL);
237 DLLIST2_REMOVE(&client->head, &client->tail, lookup);
243 else if (client->head == NULL && client->fd != -1) {
283 i_assert(client->head == NULL);
367 DLLIST2_APPEND(&client->head, &client->tail, lookup);
402 for (lookup = client->head; looku
[all...]
/dovecot/src/lib-sql/
H A Ddriver-pgsql.c899 if (ctx->ctx.head != NULL) {
900 struct sql_transaction_query *query = ctx->ctx.head;
902 ctx->ctx.head = ctx->ctx.head->next;
1007 if (ctx->failed || _ctx->head == NULL) {
1012 } else if (_ctx->head->next == NULL) {
1014 sql_query(_ctx->db, _ctx->head->query,
1015 transaction_trans_query_callback, _ctx->head);
1048 for (query = ctx->ctx.head; query != NULL; query = query->next) {
1078 if (_ctx->head
[all...]
H A Ddriver-mysql.c590 while (_ctx->head != NULL) {
591 if (transaction_send_query(ctx, _ctx->head->query,
592 _ctx->head->affected_rows) < 0)
594 _ctx->head = _ctx->head->next;
612 if (_ctx->head != NULL) {
/dovecot/src/auth/
H A Dauth-cache.c16 struct auth_cache_node *head, *tail; member in struct:auth_cache
159 /* unlinking head */
160 cache->head = node->prev;
168 node->prev = cache->head;
171 cache->head = node;
396 /* move to head */
397 if (node != cache->head) {

Completed in 42 milliseconds

12