Lines Matching refs:item

101 static void notify_worker(LIBEVENT_THREAD *t, CQ_ITEM *item);
104 static void cq_push(CQ *cq, CQ_ITEM *item);
289 CQ_ITEM *item; in cq_pop() local
292 item = STAILQ_FIRST(&cq->head); in cq_pop()
293 if (item != NULL) { in cq_pop()
298 return item; in cq_pop()
304 static void cq_push(CQ *cq, CQ_ITEM *item) { in cq_push() argument
306 STAILQ_INSERT_TAIL(&cq->head, item, i_next); in cq_push()
314 CQ_ITEM *item = cache_alloc(cq->cache); in cqi_new() local
315 if (item == NULL) { in cqi_new()
320 return item; in cqi_new()
326 static void cqi_free(CQ *cq, CQ_ITEM *item) { in cqi_free() argument
327 cache_free(cq->cache, item); in cqi_free()
336 static void notify_worker(LIBEVENT_THREAD *t, CQ_ITEM *item) { in notify_worker() argument
337 cq_push(t->ev_queue, item); in notify_worker()
355 CQ_ITEM *item; in notify_worker_fd() local
356 while ( (item = cqi_new(t->ev_queue)) == NULL ) { in notify_worker_fd()
367 item->mode = mode; in notify_worker_fd()
368 item->sfd = sfd; in notify_worker_fd()
369 notify_worker(t, item); in notify_worker_fd()
589 CQ_ITEM *item; in thread_libevent_process() local
613 item = cq_pop(me->ev_queue); in thread_libevent_process()
614 if (item == NULL) { in thread_libevent_process()
618 switch (item->mode) { in thread_libevent_process()
620 c = conn_new(item->sfd, item->init_state, item->event_flags, in thread_libevent_process()
621 item->read_buffer_size, item->transport, in thread_libevent_process()
622 me->base, item->ssl, item->conntag, item->bproto); in thread_libevent_process()
624 if (IS_UDP(item->transport)) { in thread_libevent_process()
630 item->sfd); in thread_libevent_process()
632 if (item->ssl) { in thread_libevent_process()
633 ssl_conn_close(item->ssl); in thread_libevent_process()
634 item->ssl = NULL; in thread_libevent_process()
636 close(item->sfd); in thread_libevent_process()
655 conn_close_idle(conns[item->sfd]); in thread_libevent_process()
659 conn_worker_readd(conns[item->sfd]); in thread_libevent_process()
672 cqi_free(me->ev_queue, item); in thread_libevent_process()
775 CQ_ITEM *item = NULL; in dispatch_conn_new() local
783 item = cqi_new(thread->ev_queue); in dispatch_conn_new()
784 if (item == NULL) { in dispatch_conn_new()
791 item->sfd = sfd; in dispatch_conn_new()
792 item->init_state = init_state; in dispatch_conn_new()
793 item->event_flags = event_flags; in dispatch_conn_new()
794 item->read_buffer_size = read_buffer_size; in dispatch_conn_new()
795 item->transport = transport; in dispatch_conn_new()
796 item->mode = queue_new_conn; in dispatch_conn_new()
797 item->ssl = ssl; in dispatch_conn_new()
798 item->conntag = conntag; in dispatch_conn_new()
799 item->bproto = bproto; in dispatch_conn_new()
802 notify_worker(thread, item); in dispatch_conn_new()
867 item *item_alloc(const char *key, size_t nkey, client_flags_t flags, rel_time_t exptime, int nbytes… in item_alloc()
868 item *it; in item_alloc()
878 item *item_get(const char *key, const size_t nkey, LIBEVENT_THREAD *t, const bool do_update) { in item_get()
879 item *it; in item_get()
891 item *item_get_locked(const char *key, const size_t nkey, LIBEVENT_THREAD *t, const bool do_update,… in item_get_locked()
892 item *it; in item_get_locked()
899 item *item_touch(const char *key, size_t nkey, uint32_t exptime, LIBEVENT_THREAD *t) { in item_touch()
900 item *it; in item_touch()
913 void item_remove(item *item) { in item_remove() argument
915 hv = hash(ITEM_key(item), item->nkey); in item_remove()
918 do_item_remove(item); in item_remove()
927 int item_replace(item *old_it, item *new_it, const uint32_t hv, const uint64_t cas_in) { in item_replace()
934 void item_unlink(item *item) { in item_unlink() argument
936 hv = hash(ITEM_key(item), item->nkey); in item_unlink()
938 do_item_unlink(item, hv); in item_unlink()
962 enum store_item_type store_item(item *item, int comm, LIBEVENT_THREAD *t, int *nbytes, uint64_t *ca… in store_item() argument
966 hv = hash(ITEM_key(item), item->nkey); in store_item()
968 ret = do_store_item(item, comm, t, hv, nbytes, cas, cas_in, cas_stale); in store_item()