/qemu/include/qemu/ |
H A D | queue.h | 51 * head of the list. Elements being removed from the head of the list 61 * or after an existing element or at the head of the list. A list 64 * A simple queue is headed by a pair of pointers, one the head of the 67 * head of the list. New elements can be added to the list after 68 * an existing element, at the head of the list, or at the end of the 71 * A tail queue is headed by a pair of pointers, one to the head of the 75 * after an existing element, at the head of the list, or at the end of 89 #define QLIST_HEAD_INITIALIZER(head) \ argument 101 #define QLIST_INIT(head) do { \ argument 102 (head)->lh_first = NULL; \ [all …]
|
H A D | rcu_queue.h | 34 #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 84 /* Upon publication of the head->first value, list readers 85 * will see the new element when following the head, but may 90 #define QLIST_INSERT_HEAD_RCU(head, elm, field) do { \ argument 91 (elm)->field.le_prev = &(head)->lh_first; \ 92 (elm)->field.le_next = (head)->lh_first; \ 93 qatomic_rcu_set((&(head)->lh_first), (elm)); \ 114 #define QLIST_FOREACH_RCU(var, head, field) \ argument 115 for ((var) = qatomic_rcu_read(&(head)->lh_first); \ [all …]
|
H A D | notify.h | 32 #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) }
|
H A D | rcu.h | 136 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; \
|
/qemu/tests/unit/ |
H A D | test-fifo.c | 31 * head --v-- tail used = 0 in test_fifo8_pop_bufptr_wrap() 37 * head --v ]-- tail used = 4 in test_fifo8_pop_bufptr_wrap() 42 * head --v ]-- tail used = 2 in test_fifo8_pop_bufptr_wrap() 51 * tail --]v-- head used = 8 in test_fifo8_pop_bufptr_wrap() 56 * head --v ]-- tail used = 2 in test_fifo8_pop_bufptr_wrap() 77 * head --v-- tail used = 0 in test_fifo8_pop_bufptr() 83 * head --v ]-- tail used = 4 in test_fifo8_pop_bufptr() 88 * head --v ]-- tail used = 2 in test_fifo8_pop_bufptr() 109 * head --v-- tail used = 0 in test_fifo8_peek_bufptr_wrap() 115 * head --v ]-- tail used = 4 in test_fifo8_peek_bufptr_wrap() [all …]
|
H A D | test-qemu-opts.c | 22 .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() 220 g_assert(!QTAILQ_EMPTY(&list->head)); in test_qemu_opt_get_bool() [all …]
|
/qemu/util/ |
H A D | fifo8.c | 22 fifo->head = 0; in fifo8_reset() 40 fifo->data[(fifo->head + fifo->num) % fifo->capacity] = data; in fifo8_push() 50 start = (fifo->head + fifo->num) % fifo->capacity; in fifo8_push_all() 68 ret = fifo->data[fifo->head++]; in fifo8_pop() 69 fifo->head %= fifo->capacity; in fifo8_pop() 77 return fifo->data[fifo->head]; in fifo8_peek() 85 uint32_t num, head; in fifo8_peekpop_bufptr() local 89 head = (fifo->head + skip) % fifo->capacity; in fifo8_peekpop_bufptr() 90 num = MIN(fifo->capacity - head, max); in fifo8_peekpop_bufptr() 91 ret = &fifo->data[head]; in fifo8_peekpop_bufptr() [all …]
|
H A D | qht.c | 36 * 1. "head" buckets are the ones allocated in the array of buckets in qht_map. 37 * 2. all "non-head" buckets (i.e. all others) are members of a chain that 38 * starts from a head bucket. 39 * Note that the seqlock and spinlock of a head bucket applies to all buckets 40 * chained to it; these two fields are unused in non-head buckets. 174 * @buckets: array of head buckets. It is constant once the map is created. 175 * @n_buckets: number of head buckets. It is constant once the map is created. 176 * @n_added_buckets: number of added (i.e. "non-head") buckets 373 * Get a head bucket and lock it, making sure its parent map is not stale. 414 struct qht_bucket *head) in qht_chain_destroy() argument [all …]
|
/qemu/hw/net/rocker/ |
H A D | rocker_desc.c | 28 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() 236 * head (the empty ring condition). in ring_pump() 240 while (ring->head != ring->tail) { in ring_pump() 255 uint32_t head = ring->head; in desc_ring_set_head() local 262 DPRINTF("ERROR: trying to set head (%d) past ring[%d] size (%d)\n", in desc_ring_set_head() 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() 270 "(head %d, tail %d, new head %d)\n", in desc_ring_set_head() [all …]
|
/qemu/system/ |
H A D | memory_mapping.c | 30 QTAILQ_FOREACH(p, &list->head, next) { in memory_mapping_list_add_mapping_sorted() 36 QTAILQ_INSERT_TAIL(&list->head, mapping, next); in memory_mapping_list_add_mapping_sorted() 114 if (QTAILQ_EMPTY(&list->head)) { in memory_mapping_list_add_merge_sorted() 127 QTAILQ_FOREACH(memory_mapping, &list->head, next) { in memory_mapping_list_add_merge_sorted() 159 QTAILQ_FOREACH_SAFE(p, &list->head, next, q) { in memory_mapping_list_free() 160 QTAILQ_REMOVE(&list->head, p, next); in memory_mapping_list_free() 172 QTAILQ_INIT(&list->head); in memory_mapping_list_init() 179 QTAILQ_FOREACH_SAFE(p, &list->head, next, q) { in guest_phys_blocks_free() 180 QTAILQ_REMOVE(&list->head, p, next); in guest_phys_blocks_free() 190 QTAILQ_INIT(&list->head); in guest_phys_blocks_init() [all …]
|
H A D | tpm.c | 199 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/tests/qtest/ |
H A D | fdc-test.c | 120 uint8_t head = 0; in send_read_command() local 134 floppy_send(head << 2 | drive); in send_read_command() 137 floppy_send(head); in send_read_command() 176 uint8_t head = 0; in send_read_no_dma_command() local 190 floppy_send(head << 2 | drive); in send_read_no_dma_command() 193 floppy_send(head); in send_read_no_dma_command() 250 int head = 0; in send_seek() local 253 floppy_send(head << 2 | drive); in send_seek() 361 int head = 0; in test_sense_interrupt() local 370 floppy_send(head << 2 | drive); in test_sense_interrupt() [all …]
|
/qemu/qobject/ |
H A D | qlist.c | 33 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 D | qemu-config-qmp.c | 45 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/tests/qtest/libqos/ |
H A D | libqos-malloc.c | 32 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() 43 static MemBlock *mlist_find_space(MemList *head, uint64_t size) in mlist_find_space() argument 47 QTAILQ_FOREACH(node, head, MLIST_ENTNAME) { in mlist_find_space() 55 static MemBlock *mlist_sort_insert(MemList *head, MemBlock *insr) in mlist_sort_insert() argument 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() 76 static MemBlock *mlist_join(MemList *head, MemBlock *left, MemBlock *right) in mlist_join() argument 78 g_assert(head && left && right); in mlist_join() [all …]
|
/qemu/plugins/ |
H A D | loader.c | 51 QemuPluginList *head; member 58 .head = QTAILQ_HEAD_INITIALIZER(qemu_plugin_opts.head), 78 static struct qemu_plugin_desc *plugin_find_desc(QemuPluginList *head, in plugin_find_desc() argument 83 QTAILQ_FOREACH(desc, head, entry) { in plugin_find_desc() 109 p = plugin_find_desc(arg->head, value); in plugin_add() 113 QTAILQ_INSERT_TAIL(arg->head, p, entry); in plugin_add() 145 void qemu_plugin_opt_parse(const char *optstr, QemuPluginList *head) in qemu_plugin_opt_parse() argument 154 arg.head = head; in qemu_plugin_opt_parse() 285 * @head: head of the list of descriptors of the plugins to be loaded 290 * from the list given by @head. [all …]
|
/qemu/hw/pci/ |
H A D | pci-qmp-cmds.c | 35 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/include/standard-headers/linux/ |
H A D | virtio_iommu.h | 75 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 D | cocci-macro-file.h | 50 #define QLIST_HEAD_INITIALIZER(head) \ argument 67 #define QSLIST_HEAD_INITIALIZER(head) \ argument 84 #define QSIMPLEQ_HEAD_INITIALIZER(head) \ argument 85 { NULL, &(head).sqh_first } 101 #define QTAILQ_HEAD_INITIALIZER(head) \ argument 102 { .tqh_circ = { NULL, &(head).tqh_circ } }
|
H A D | clean-includes | 17 # clean-includes [--git subjectprefix] [--check-dup-head] file ... 19 # clean-includes [--git subjectprefix] [--check-dup-head] --all 26 # If --check-dup-head is specified, additionally check for duplicate 45 # for i in $(git ls-tree --name-only HEAD) ; do test -f $i && \ 46 # grep -E '^# *include' $i | head -1 | grep 'osdep.h' ; test $? != 0 && \ 69 "--check-dup-head") 84 echo "Usage: clean-includes [--git subjectprefix] [--check-dup-head] [--all | foo.c ...]"
|
/qemu/block/ |
H A D | linux-aio.c | 122 unsigned head; /* Written to by userland or by kernel. */ member 140 * ring buffer, only reads head and tail. When @events has been 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() 162 * @nr: the number of events on which head should be advanced 164 * Advances head of a ring buffer. 171 ring->head = (ring->head + nr) % ring->nr; in io_getevents_commit() 179 * @nr: the number of events on which head should be advanced 181 * Advances head of a ring buffer and returns number of elements left.
|
/qemu/docs/ |
H A D | multiseat.txt | 30 -device pci-bridge,addr=12.0,chassis_nr=2,id=head.2 \ 31 -device secondary-vga,bus=head.2,addr=02.0,id=video.2 \ 32 -device nec-usb-xhci,bus=head.2,addr=0f.0,id=usb.2 \ 47 -device pci-bridge,addr=12.0,chassis_nr=2,id=head.2 \ 48 -device secondary-vga,bus=head.2,addr=02.0,id=video.2 \ 49 -device virtio-keyboard-pci,bus=head.2,addr=03.0,display=video.2 \ 50 -device virtio-tablet-pci,bus=head.2,addr=03.0,display=video.2
|
/qemu/fsdev/ |
H A D | qemu-fsdev-opts.c | 17 .head = QTAILQ_HEAD_INITIALIZER(qemu_fsdev_opts.head), 60 .head = QTAILQ_HEAD_INITIALIZER(qemu_virtfs_opts.head),
|
/qemu/hw/acpi/ |
H A D | acpi-qmp-cmds.c | 16 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/tests/qemu-iotests/tests/ |
H A D | iov-padding | 48 # - Offset 4096, length 1023 * 512 + 4096: Head is aligned, tail is not 49 # - Offset 512, length 1023 * 512 + 512: Neither head nor tail are aligned 50 # - Offset 512, length 1023 * 512 + 4096: Tail is aligned, head is not 62 cmd_params="-P 2 $start_offset $(yes 512 | head -n 1023 | tr '\n' ' ') $last_element_length"
|