Home
last modified time | relevance | path

Searched refs:head (Results 1 – 25 of 197) sorted by relevance

12345678

/qemu/include/qemu/
H A Dqueue.h179 #define QLIST_EMPTY(head) ((head)->lh_first == NULL) argument
180 #define QLIST_FIRST(head) ((head)->lh_first) argument
264 #define QSLIST_EMPTY(head) ((head)->slh_first == NULL) argument
265 #define QSLIST_FIRST(head) ((head)->slh_first) argument
291 (head)->sqh_last = &(head)->sqh_first; \
313 typeof((head)->sqh_first) elm = (head)->sqh_first; \
315 (head)->sqh_last = &(head)->sqh_first; \
381 #define QSIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL) argument
382 #define QSIMPLEQ_FIRST(head) ((head)->sqh_first) argument
496 #define QTAILQ_EMPTY(head) ((head)->tqh_first == NULL) argument
[all …]
H A Drcu_queue.h34 #define QLIST_EMPTY_RCU(head) (qatomic_read(&(head)->lh_first) == NULL) argument
35 #define QLIST_FIRST_RCU(head) (qatomic_rcu_read(&(head)->lh_first)) argument
131 #define QSIMPLEQ_EMPTY_RCU(head) \ argument
133 #define QSIMPLEQ_FIRST_RCU(head) qatomic_rcu_read(&(head)->sqh_first) argument
160 qatomic_set(&(head)->sqh_first, (head)->sqh_first->field.sqe_next);\
162 (head)->sqh_last = &(head)->sqh_first; \
197 #define QTAILQ_EMPTY_RCU(head) (qatomic_read(&(head)->tqh_first) == NULL) argument
198 #define QTAILQ_FIRST_RCU(head) qatomic_rcu_read(&(head)->tqh_first) argument
267 #define QSLIST_EMPTY_RCU(head) (qatomic_read(&(head)->slh_first) == NULL) argument
268 #define QSLIST_FIRST_RCU(head) qatomic_rcu_read(&(head)->slh_first) argument
[all …]
H A Drcu.h136 typedef void RCUCBFunc(struct rcu_head *head);
143 void call_rcu1(struct rcu_head *head, RCUCBFunc *func);
149 #define call_rcu(head, func, field) \ argument
152 offset_must_be_zero[-offsetof(typeof(*(head)), field)], \
153 func_type_invalid = (func) - (void (*)(typeof(head)))(func); \
154 &(head)->field; \
H A Dnotify.h32 #define NOTIFIER_LIST_INITIALIZER(head) \ argument
33 { QLIST_HEAD_INITIALIZER((head).notifiers) }
65 #define NOTIFIER_WITH_RETURN_LIST_INITIALIZER(head) \ argument
66 { QLIST_HEAD_INITIALIZER((head).notifiers) }
/qemu/util/
H A Dfifo8.c23 fifo->head = 0; in fifo8_create()
35 fifo->data[(fifo->head + fifo->num) % fifo->capacity] = data; in fifo8_push()
45 start = (fifo->head + fifo->num) % fifo->capacity; in fifo8_push_all()
63 ret = fifo->data[fifo->head++]; in fifo8_pop()
64 fifo->head %= fifo->capacity; in fifo8_pop()
76 num = MIN(fifo->capacity - fifo->head, max); in fifo8_peekpop_buf()
77 ret = &fifo->data[fifo->head]; in fifo8_peekpop_buf()
80 fifo->head += num; in fifo8_peekpop_buf()
81 fifo->head %= fifo->capacity; in fifo8_peekpop_buf()
103 fifo->head = 0; in fifo8_reset()
[all …]
H A Dqht.c417 struct qht_bucket *curr = head->next; in qht_chain_destroy()
488 struct qht_bucket *b = head; in qht_bucket_reset__locked()
491 seqlock_write_begin(&head->sequence); in qht_bucket_reset__locked()
503 seqlock_write_end(&head->sequence); in qht_bucket_reset__locked()
559 const struct qht_bucket *b = head; in qht_do_lookup()
632 struct qht_bucket *b = head; in qht_insert__locked()
663 seqlock_write_begin(&head->sequence); in qht_insert__locked()
670 seqlock_write_end(&head->sequence); in qht_insert__locked()
784 struct qht_bucket *b = head; in qht_remove__locked()
826 struct qht_bucket *b = head; in qht_bucket_iter()
[all …]
H A Dfdmon-io_uring.c102 static void enqueue(AioHandlerSList *head, AioHandler *node, unsigned flags) in enqueue() argument
108 QSLIST_INSERT_HEAD_ATOMIC(head, node, node_submitted); in enqueue()
113 static AioHandler *dequeue(AioHandlerSList *head, unsigned *flags) in dequeue() argument
115 AioHandler *node = QSLIST_FIRST(head); in dequeue()
122 QSLIST_REMOVE_HEAD(head, node_submitted); in dequeue()
261 unsigned head; in process_cq_ring() local
263 io_uring_for_each_cqe(ring, head, cqe) { in process_cq_ring()
H A Dqemu-option.c238 QTAILQ_REMOVE(&opt->opts->head, opt, next); in qemu_opt_del()
277 iter->opt = QTAILQ_FIRST(&opts->head); in qemu_opt_iter_init()
489 QTAILQ_INSERT_TAIL(&opts->head, opt, next); in opt_create()
544 QTAILQ_INSERT_TAIL(&opts->head, opt, next); in qemu_opt_set_bool()
567 QTAILQ_INSERT_TAIL(&opts->head, opt, next); in qemu_opt_set_number()
583 QTAILQ_FOREACH(opt, &opts->head, next) { in qemu_opt_foreach()
597 QTAILQ_FOREACH(opts, &list->head, next) { in qemu_opts_find()
641 QTAILQ_INIT(&opts->head); in qemu_opts_create()
680 opt = QTAILQ_FIRST(&opts->head); in qemu_opts_del()
1103 QTAILQ_FOREACH(opt, &opts->head, next) { in qemu_opts_validate()
[all …]
/qemu/tests/qtest/
H A Dfdc-test.c120 uint8_t head = 0; in send_read_command() local
137 floppy_send(head); in send_read_command()
176 uint8_t head = 0; in send_read_no_dma_command() local
193 floppy_send(head); in send_read_no_dma_command()
250 int head = 0; in send_seek() local
361 int head = 0; in test_sense_interrupt() local
383 uint8_t head = 0; in test_relative_seek() local
412 uint8_t head = 0; in test_read_id() local
442 head = floppy_recv(); in test_read_id()
453 head = 1; in test_read_id()
[all …]
/qemu/system/
H A Dmemory_mapping.c29 QTAILQ_FOREACH(p, &list->head, next) { in memory_mapping_list_add_mapping_sorted()
35 QTAILQ_INSERT_TAIL(&list->head, mapping, next); in memory_mapping_list_add_mapping_sorted()
113 if (QTAILQ_EMPTY(&list->head)) { in memory_mapping_list_add_merge_sorted()
158 QTAILQ_FOREACH_SAFE(p, &list->head, next, q) { in memory_mapping_list_free()
159 QTAILQ_REMOVE(&list->head, p, next); in memory_mapping_list_free()
171 QTAILQ_INIT(&list->head); in memory_mapping_list_init()
178 QTAILQ_FOREACH_SAFE(p, &list->head, next, q) { in guest_phys_blocks_free()
179 QTAILQ_REMOVE(&list->head, p, next); in guest_phys_blocks_free()
189 QTAILQ_INIT(&list->head); in guest_phys_blocks_init()
207 if (!QTAILQ_EMPTY(&g->list->head)) { in guest_phys_block_add_section()
[all …]
H A Dtpm.c199 TPMInfoList *head = NULL, **tail = &head; in qmp_query_tpm() local
209 return head; in qmp_query_tpm()
215 TpmTypeList *head = NULL, **tail = &head; in qmp_query_tpm_types() local
224 return head; in qmp_query_tpm_types()
228 TpmModelList *head = NULL, **tail = &head; in qmp_query_tpm_models() local
238 return head; in qmp_query_tpm_models()
/qemu/qobject/
H A Dqlist.c33 QTAILQ_INIT(&qlist->head); in qlist_new()
64 QTAILQ_INSERT_TAIL(&qlist->head, entry, next); in qlist_append_obj()
92 if (qlist == NULL || QTAILQ_EMPTY(&qlist->head)) { in qlist_pop()
96 entry = QTAILQ_FIRST(&qlist->head); in qlist_pop()
97 QTAILQ_REMOVE(&qlist->head, entry, next); in qlist_pop()
109 if (qlist == NULL || QTAILQ_EMPTY(&qlist->head)) { in qlist_peek()
113 entry = QTAILQ_FIRST(&qlist->head); in qlist_peek()
120 return QTAILQ_EMPTY(&qlist->head); in qlist_empty()
177 QTAILQ_FOREACH_SAFE(entry, &qlist->head, next, next_entry) { in qlist_destroy_obj()
178 QTAILQ_REMOVE(&qlist->head, entry, next); in qlist_destroy_obj()
/qemu/monitor/
H A Dqemu-config-qmp.c45 static void cleanup_infolist(CommandLineParameterInfoList *head) in cleanup_infolist() argument
49 cur = head; in cleanup_infolist()
51 pre_entry = head; in cleanup_infolist()
67 static void connect_infolist(CommandLineParameterInfoList *head, in connect_infolist() argument
72 cur = head; in connect_infolist()
82 CommandLineParameterInfoList *head = NULL, *cur; in get_drive_infolist() local
86 if (!head) { in get_drive_infolist()
87 head = query_option_descs(drive_config_groups[i]->desc); in get_drive_infolist()
90 connect_infolist(head, cur); in get_drive_infolist()
93 cleanup_infolist(head); in get_drive_infolist()
[all …]
/qemu/hw/net/rocker/
H A Drocker_desc.c28 uint32_t head; member
101 return ring->head == ring->tail; in desc_ring_empty()
137 ring->head = ring->tail = 0; in desc_ring_set_size()
240 while (ring->head != ring->tail) { in ring_pump()
255 uint32_t head = ring->head; in desc_ring_set_head() local
267 if (((head < tail) && ((new >= tail) || (new < head))) || in desc_ring_set_head()
268 ((head > tail) && ((new >= tail) && (new < head)))) { in desc_ring_set_head()
275 if (new == ring->head) { in desc_ring_set_head()
279 ring->head = new; in desc_ring_set_head()
286 return ring->head; in desc_ring_get_head()
[all …]
/qemu/tests/qtest/libqos/
H A Dlibqos-malloc.c32 static MemBlock *mlist_find_key(MemList *head, uint64_t addr) in mlist_find_key() argument
35 QTAILQ_FOREACH(node, head, MLIST_ENTNAME) { in mlist_find_key()
47 QTAILQ_FOREACH(node, head, MLIST_ENTNAME) { in mlist_find_space()
58 g_assert(head && insr); in mlist_sort_insert()
60 QTAILQ_FOREACH(node, head, MLIST_ENTNAME) { in mlist_sort_insert()
67 QTAILQ_INSERT_TAIL(head, insr, MLIST_ENTNAME); in mlist_sort_insert()
78 g_assert(head && left && right); in mlist_join()
81 mlist_delete(head, right); in mlist_join()
85 static void mlist_coalesce(MemList *head, MemBlock *node) in mlist_coalesce() argument
99 node = mlist_join(head, left, node); in mlist_coalesce()
[all …]
/qemu/plugins/
H A Dloader.c53 QemuPluginList *head; member
60 .head = QTAILQ_HEAD_INITIALIZER(qemu_plugin_opts.head),
80 static struct qemu_plugin_desc *plugin_find_desc(QemuPluginList *head, in plugin_find_desc() argument
85 QTAILQ_FOREACH(desc, head, entry) { in plugin_find_desc()
106 p = plugin_find_desc(arg->head, value); in plugin_add()
110 QTAILQ_INSERT_TAIL(arg->head, p, entry); in plugin_add()
142 void qemu_plugin_opt_parse(const char *optstr, QemuPluginList *head) in qemu_plugin_opt_parse() argument
151 arg.head = head; in qemu_plugin_opt_parse()
289 int qemu_plugin_load_list(QemuPluginList *head, Error **errp) in qemu_plugin_load_list() argument
306 QTAILQ_FOREACH_SAFE(desc, head, entry, next) { in qemu_plugin_load_list()
[all …]
/qemu/include/standard-headers/linux/
H A Dvirtio_iommu.h75 struct virtio_iommu_req_head head; member
84 struct virtio_iommu_req_head head; member
100 struct virtio_iommu_req_head head; member
110 struct virtio_iommu_req_head head; member
132 struct virtio_iommu_probe_property head; member
140 struct virtio_iommu_req_head head; member
/qemu/scripts/
H A Dcocci-macro-file.h54 #define QLIST_HEAD_INITIALIZER(head) \ argument
71 #define QSLIST_HEAD_INITIALIZER(head) \ argument
88 #define QSIMPLEQ_HEAD_INITIALIZER(head) \ argument
89 { NULL, &(head).sqh_first }
105 #define QTAILQ_HEAD_INITIALIZER(head) \ argument
106 { .tqh_circ = { NULL, &(head).tqh_circ } }
/qemu/hw/pci/
H A Dpci-qmp-cmds.c35 PciMemoryRegionList *head = NULL, **tail = &head; in qmp_query_pci_regions() local
65 return head; in qmp_query_pci_regions()
159 PciDeviceInfoList *head = NULL, **tail = &head; in qmp_query_pci_devices() local
170 return head; in qmp_query_pci_devices()
189 PciInfoList *head = NULL, **tail = &head; in qmp_query_pci() local
198 return head; in qmp_query_pci()
/qemu/hw/input/
H A Dhid.c126 e = &hs->ptr.queue[(hs->head + hs->n) & QUEUE_MASK]; in hid_pointer_event()
183 curr = &hs->ptr.queue[(hs->head + hs->n) & QUEUE_MASK]; in hid_pointer_sync()
244 slot = (hs->head + hs->n) & QUEUE_MASK; hs->n++; in hid_keyboard_event()
258 slot = hs->head & QUEUE_MASK; QUEUE_INCR(hs->head); hs->n--; in hid_keyboard_process_keycode()
370 index = (hs->n ? hs->head : hs->head - 1); in hid_pointer_poll()
389 QUEUE_INCR(hs->head); in hid_pointer_poll()
499 hs->head = 0; in hid_reset()
568 evt = s->ptr.queue[(s->head+s->n) & QUEUE_MASK]; in hid_post_load()
574 s->head = 0; in hid_post_load()
601 VMSTATE_UINT32(head, HIDState),
[all …]
/qemu/tests/unit/
H A Dtest-qemu-opts.c22 .head = QTAILQ_HEAD_INITIALIZER(opts_list_01.head),
49 .head = QTAILQ_HEAD_INITIALIZER(opts_list_02.head),
80 .head = QTAILQ_HEAD_INITIALIZER(opts_list_03.head),
89 .head = QTAILQ_HEAD_INITIALIZER(opts_list_04.head),
136 g_assert(QTAILQ_EMPTY(&list->head)); in test_qemu_opts_create()
146 g_assert(!QTAILQ_EMPTY(&list->head)); in test_qemu_opts_create()
167 g_assert(QTAILQ_EMPTY(&list->head)); in test_qemu_opt_get()
177 g_assert(!QTAILQ_EMPTY(&list->head)); in test_qemu_opt_get()
210 g_assert(QTAILQ_EMPTY(&list->head)); in test_qemu_opt_get_bool()
253 g_assert(QTAILQ_EMPTY(&list->head)); in test_qemu_opt_get_number()
[all …]
/qemu/fsdev/
H A Dqemu-fsdev-opts.c17 .head = QTAILQ_HEAD_INITIALIZER(qemu_fsdev_opts.head),
60 .head = QTAILQ_HEAD_INITIALIZER(qemu_virtfs_opts.head),
/qemu/migration/
H A Drdma.c1728 assert(head->len <= RDMA_CONTROL_MAX_BUFFER - sizeof(*head)); in qemu_rdma_post_send_control()
1806 } else if (head->type != expecting || head->type == RDMA_CONTROL_ERROR) { in qemu_rdma_exchange_get_response()
1810 control_desc(head->type), head->type, head->len); in qemu_rdma_exchange_get_response()
1816 if (head->len > RDMA_CONTROL_MAX_BUFFER - sizeof(*head)) { in qemu_rdma_exchange_get_response()
1820 if (sizeof(*head) + head->len != byte_len) { in qemu_rdma_exchange_get_response()
1822 head->len, byte_len); in qemu_rdma_exchange_get_response()
2075 head.len = sizeof(comp); in qemu_rdma_write_one()
2792 head.len = len; in qio_channel_rdma_writev()
2843 RDMAControlHeader head; in qio_channel_rdma_readv() local
3527 RDMAControlHeader head; in rdma_registration_handle() local
[all …]
/qemu/hw/acpi/
H A Dacpi-qmp-cmds.c16 ACPIOSTInfoList *head = NULL; in qmp_query_acpi_ospm_status() local
17 ACPIOSTInfoList **prev = &head; in qmp_query_acpi_ospm_status()
29 return head; in qmp_query_acpi_ospm_status()
/qemu/block/
H A Dlinux-aio.c122 unsigned head; /* Written to by userland or by kernel. */ member
147 unsigned int head = ring->head, tail = ring->tail; in io_getevents_peek() local
150 nr = tail >= head ? tail - head : ring->nr - head; in io_getevents_peek()
151 *events = ring->io_events + head; in io_getevents_peek()
171 ring->head = (ring->head + nr) % ring->nr; in io_getevents_commit()

12345678