prefix mini-os lists with minios_, drop QEMU_ prefix from QEMU_LIST_*
PATCH 1/1 prefix mini-os lists with minios_, drop QEMU_ prefix from QEMU_LIST_*
prefix mini-os lists with minios_, drop QEMU_ prefix from QEMU_LIST_*
That permits to reduce the amount of difference with upstream.
extras/mini-os/fs-front.c +11 -11
@@ -1170,7 +1170,7 @@ done:return 1 ; } -static void add_export (struct list_head *exports,unsigned int domid) +static void add_export (struct minios_list_head *exports,unsigned int domid) {char node[1024 ], **exports_list =NULL , *ret_msg;int j =0 ;
@@ -1192,8 +1192,8 @@ static void add_export(struct list_head import->dom_id = domid; import->export_id = export_id; import->import_id = import_id++; -INIT_LIST_HEAD (&import->list); -list_add (&import->list, exports); +MINIOS_INIT_LIST_HEAD (&import->list); +minios_list_add (&import->list, exports); }free (exports_list[j]); j++;
@@ -1205,14 +1205,14 @@ static void add_export(struct list_head }#if 0 -static struct list_head *probe_exports (void ) +static struct minios_list_head *probe_exports (void ) { -struct list_head *exports; +struct minios_list_head *exports;char **node_list =NULL , *msg =NULL ;int i =0 ; - exports = xmalloc(struct list_head); -INIT_LIST_HEAD (exports); + exports = xmalloc(struct minios_list_head); +MINIOS_INIT_LIST_HEAD (exports); msg =xenbus_ls (XBT_NIL ,"/local/domain" , &node_list);if (msg)
@@ -1237,19 +1237,19 @@ exit: }#endif -LIST_HEAD (exports); +MINIOS_LIST_HEAD (exports);void init_fs_frontend (void ) { -struct list_head *entry; +struct minios_list_head *entry;struct fs_import *import =NULL ;printk ("Initing FS fronend(s).\n" );//exports = probe_exports(); add_export (&exports,0 ); -list_for_each (entry, &exports) +minios_list_for_each (entry, &exports) { - import = list_entry(entry, struct fs_import, list); + import = minios_list_entry(entry, struct fs_import, list);printk ("FS export [dom=%d, id=%d] found\n" , import->dom_id, import->export_id);init_fs_import (import);
extras/mini-os/include/fs.h +1 -1
@@ -13,7 +13,7 @@ struct fs_importdomid_t dom_id;/* dom id of the exporting domain */ u16 export_id;/* export id (exporting dom specific) */ u16 import_id;/* import id (specific to this domain) */ -struct list_head list;/* list of all imports */ +struct minios_list_head list;/* list of all imports */ unsigned int nr_entries;/* Number of entries in rings & request array */ struct fsif_front_ring ring;/* frontend ring (contains shared ring) */
extras/mini-os/include/list.h +57 -57
226 lines not on this page · raw message
extras/mini-os/include/sched.h +1 -1
@@ -19,7 +19,7 @@ struct thread#else /* !defined(__ia64__) */ thread_regs_t regs;#endif /* !defined(__ia64__) */ -struct list_head thread_list; +struct minios_list_head thread_list;u32 flags;s_time_t wakeup_time;#ifdef HAVE_LIBC
extras/mini-os/include/semaphore.h +1 -1
@@ -21,7 +21,7 @@ struct rw_semaphore {struct rw_semaphore {signed long count;spinlock_t wait_lock; -struct list_head wait_list; +struct minios_list_head wait_list;int debug; };
extras/mini-os/include/wait.h +9 -9
@@ -8,42 +8,42 @@#define DEFINE_WAIT (name) \ struct wait_queue name = { \ .thread = current, \ - .thread_list = LIST_HEAD_INIT((name).thread_list), \ + .thread_list = MINIOS_LIST_HEAD_INIT((name).thread_list), \ }static inline void init_waitqueue_head (struct wait_queue_head *h) { -INIT_LIST_HEAD (&h->thread_list); +MINIOS_INIT_LIST_HEAD (&h->thread_list); }static inline void init_waitqueue_entry (struct wait_queue *q,struct thread *thread) { q->thread = thread; -INIT_LIST_HEAD (&q->thread_list); +MINIOS_INIT_LIST_HEAD (&q->thread_list); }static inline void add_wait_queue (struct wait_queue_head *h,struct wait_queue *q) { -if (list_empty (&q->thread_list)) -list_add (&q->thread_list, &h->thread_list); +if (minios_list_empty (&q->thread_list)) +minios_list_add (&q->thread_list, &h->thread_list); }static inline void remove_wait_queue (struct wait_queue *q) { -list_del (&q->thread_list); +minios_list_del (&q->thread_list); }static inline void wake_up (struct wait_queue_head *head) {unsigned long flags; -struct list_head *tmp, *next; +struct minios_list_head *tmp, *next;local_irq_save (flags); -list_for_each_safe (tmp, next, &head->thread_list) +minios_list_for_each_safe (tmp, next, &head->thread_list) {struct wait_queue *curr; - curr = list_entry(tmp, struct wait_queue, thread_list); + curr = minios_list_entry(tmp, struct wait_queue, thread_list);wake (curr->thread); }local_irq_restore (flags);
extras/mini-os/include/waittypes.h +2 -2
@@ -7,13 +7,13 @@ struct wait_queuestruct wait_queue {struct thread *thread; -struct list_head thread_list; +struct minios_list_head thread_list; };struct wait_queue_head {/* TODO - lock required? */ -struct list_head thread_list; +struct minios_list_head thread_list; };#define DECLARE_WAIT_QUEUE_HEAD (name) \
extras/mini-os/lib/xmalloc.c +10 -10
@@ -44,14 +44,14 @@#include <xmalloc.h> #ifndef HAVE_LIBC -static LIST_HEAD (freelist); +static MINIOS_LIST_HEAD (freelist);/* static spinlock_t freelist_lock = SPIN_LOCK_UNLOCKED; */ struct xmalloc_hdr {/* Total including this hdr, unused padding and second hdr. */ size_t size; -struct list_head freelist; +struct minios_list_head freelist; } __cacheline_aligned;/* Unused padding data between the two hdrs. */
@@ -82,7 +82,7 @@ static void maybe_split(struct xmalloc_h extra = (struct xmalloc_hdr *)((unsigned long )hdr + size); extra->size = leftover;/* spin_lock_irqsave(&freelist_lock, flags); */ -list_add (&extra->freelist, &freelist); +minios_list_add (&extra->freelist, &freelist);/* spin_unlock_irqrestore(&freelist_lock, flags); */ }else
@@ -155,14 +155,14 @@ void *_xmalloc(size_t size, size_t align/* Search free list. */ /* spin_lock_irqsave(&freelist_lock, flags); */ -list_for_each_entry_safe ( i, tmp, &freelist, freelist ) +minios_list_for_each_entry_safe ( i, tmp, &freelist, freelist ) { data_begin =align_up ((uintptr_t )i + hdr_size, align);if ( data_begin + size > (uintptr_t )i + i->size )continue ; -list_del (&i->freelist); +minios_list_del (&i->freelist);/* spin_unlock_irqrestore(&freelist_lock, flags); */ uintptr_t size_before = (data_begin - hdr_size) - (uintptr_t )i;
@@ -173,7 +173,7 @@ void *_xmalloc(size_t size, size_t align new_i->size = i->size - size_before; i->size = size_before;/* spin_lock_irqsave(&freelist_lock, flags); */ -list_add (&i->freelist, &freelist); +minios_list_add (&i->freelist, &freelist);/* spin_unlock_irqrestore(&freelist_lock, flags); */ i = new_i; }
@@ -231,7 +231,7 @@ void xfree(const void *p)/* Merge with other free block, or put in list. */ /* spin_lock_irqsave(&freelist_lock, flags); */ -list_for_each_entry_safe ( i, tmp, &freelist, freelist ) +minios_list_for_each_entry_safe ( i, tmp, &freelist, freelist ) {unsigned long _i = (unsigned long )i;unsigned long _hdr = (unsigned long )hdr;
@@ -243,7 +243,7 @@ void xfree(const void *p)/* We follow this block? Swallow it. */ if ( (_i + i->size) == _hdr ) { -list_del (&i->freelist); +minios_list_del (&i->freelist); i->size += hdr->size; hdr = i; }
@@ -251,7 +251,7 @@ void xfree(const void *p)/* We precede this block? Swallow it. */ if ( (_hdr + hdr->size) == _i ) { -list_del (&i->freelist); +minios_list_del (&i->freelist); hdr->size += i->size; } }
@@ -268,7 +268,7 @@ void xfree(const void *p) }else { -list_add (&hdr->freelist, &freelist); +minios_list_add (&hdr->freelist, &freelist); }/* spin_unlock_irqrestore(&freelist_lock, flags); */
extras/mini-os/sched.c +16 -16
@@ -55,18 +55,18 @@#endif struct thread *idle_thread =NULL ; -LIST_HEAD (exited_threads); +MINIOS_LIST_HEAD (exited_threads);static int threads_started;struct thread *main_thread;void inline print_runqueue (void ) { -struct list_head *it; +struct minios_list_head *it;struct thread *th; -list_for_each (it, &idle_thread->thread_list) +minios_list_for_each (it, &idle_thread->thread_list) { - th = list_entry(it, struct thread, thread_list); + th = minios_list_entry(it, struct thread, thread_list);printk (" Thread \"%s\", runnable=%d\n" , th->name,is_runnable (th)); }printk ("\n" );
@@ -75,7 +75,7 @@ void schedule(void)void schedule (void ) {struct thread *prev, *next, *thread; -struct list_head *iterator, *next_iterator; +struct minios_list_head *iterator, *next_iterator;unsigned long flags; prev = current;
@@ -97,9 +97,9 @@ void schedule(void)s_time_t now =NOW ();s_time_t min_wakeup_time = now +SECONDS (10 ); next =NULL ; -list_for_each_safe (iterator, next_iterator, &idle_thread->thread_list) +minios_list_for_each_safe (iterator, next_iterator, &idle_thread->thread_list) { - thread = list_entry(iterator, struct thread, thread_list); + thread = minios_list_entry(iterator, struct thread, thread_list);if (!is_runnable (thread) && thread->wakeup_time !=0LL ) {if (thread->wakeup_time <= now)
@@ -111,8 +111,8 @@ void schedule(void) { next = thread;/* Put this thread on the end of the list */ -list_del (&thread->thread_list); -list_add_tail (&thread->thread_list, &idle_thread->thread_list); +minios_list_del (&thread->thread_list); +minios_list_add_tail (&thread->thread_list, &idle_thread->thread_list);break ; } }
@@ -128,12 +128,12 @@ void schedule(void)inturrupted at the return instruction. And therefore at safe point. */ if (prev != next)switch_threads (prev, next); -list_for_each_safe (iterator, next_iterator, &exited_threads) +minios_list_for_each_safe (iterator, next_iterator, &exited_threads) { - thread = list_entry(iterator, struct thread, thread_list); + thread = minios_list_entry(iterator, struct thread, thread_list);if (thread != prev) { -list_del (&thread->thread_list); +minios_list_del (&thread->thread_list);free_pages (thread->stack,STACK_SIZE_PAGE_ORDER );xfree (thread); }
@@ -155,7 +155,7 @@ struct thread* create_thread(char *name,set_runnable (thread);local_irq_save (flags);if (idle_thread !=NULL ) { -list_add_tail (&thread->thread_list, &idle_thread->thread_list); +minios_list_add_tail (&thread->thread_list, &idle_thread->thread_list); }else if (function != idle_thread_fn) {printk ("BUG: Not allowed to create thread before initialising scheduler.\n" );
@@ -208,10 +208,10 @@ void exit_thread(void)printk ("Thread \"%s\" exited.\n" , thread->name);local_irq_save (flags);/* Remove from the thread list */ -list_del (&thread->thread_list); +minios_list_del (&thread->thread_list);clear_runnable (thread);/* Put onto exited list */ -list_add (&thread->thread_list, &exited_threads); +minios_list_add (&thread->thread_list, &exited_threads);local_irq_restore (flags);/* Schedule will free the resources */ while (1 )
@@ -296,6 +296,6 @@ void init_sched(void) _REENT_INIT_PTR((&callback_reent))#endif idle_thread =create_thread ("Idle" , idle_thread_fn,NULL ); -INIT_LIST_HEAD (&idle_thread->thread_list); +MINIOS_INIT_LIST_HEAD (&idle_thread->thread_list); }
tools/ioemu/audio/audio.c +19 -19
@@ -707,8 +707,8 @@ static void audio_detach_capture (HWVoic sw->rate =NULL ; } -QEMU_LIST_REMOVE (sw, entries); -QEMU_LIST_REMOVE (sc, entries); +LIST_REMOVE (sw, entries); +LIST_REMOVE (sc, entries);qemu_free (sc);if (was_active) {/* We have removed soft voice from the capture:
@@ -751,8 +751,8 @@ static int audio_attach_capture (AudioStqemu_free (sw);return -1 ; } -QEMU_LIST_INSERT_HEAD (&hw_cap->sw_head, sw, entries); -QEMU_LIST_INSERT_HEAD (&hw->cap_head, sc, entries); +LIST_INSERT_HEAD (&hw_cap->sw_head, sw, entries); +LIST_INSERT_HEAD (&hw->cap_head, sc, entries);#ifdef DEBUG_CAPTURE asprintf (&sw->name,"for %p %d,%d,%d" , hw, sw->info.freq, sw->info.bits, sw->info.nchannels);
@@ -1620,12 +1620,12 @@ void AUD_register_card (AudioState *s, c card->audio = s; card->name =qemu_strdup (name);memset (&card->entries,0 ,sizeof (card->entries)); -QEMU_LIST_INSERT_HEAD (&s->card_head, card, entries); +LIST_INSERT_HEAD (&s->card_head, card, entries); }void AUD_remove_card (QEMUSoundCard *card) { -QEMU_LIST_REMOVE (card, entries); +LIST_REMOVE (card, entries); card->audio =NULL ;qemu_free (card->name); }
@@ -1637,9 +1637,9 @@ AudioState *AUD_init (void)const char *drvname;AudioState *s = &glob_audio_state; -QEMU_LIST_INIT (&s->hw_head_out); -QEMU_LIST_INIT (&s->hw_head_in); -QEMU_LIST_INIT (&s->cap_head); +LIST_INIT (&s->hw_head_out); +LIST_INIT (&s->hw_head_in); +LIST_INIT (&s->cap_head);atexit (audio_atexit); s->ts =qemu_new_timer (vm_clock, audio_timer, s);
@@ -1731,7 +1731,7 @@ AudioState *AUD_init (void)return NULL ; } -QEMU_LIST_INIT (&s->card_head); +LIST_INIT (&s->card_head);register_savevm ("audio" ,0 ,1 , audio_save, audio_load, s);qemu_mod_timer (s->ts,qemu_get_clock (vm_clock) + conf.period.ticks);return s;
@@ -1769,7 +1769,7 @@ CaptureVoiceOut *AUD_add_capture ( cap =audio_pcm_capture_find_specific (s, as);if (cap) { -QEMU_LIST_INSERT_HEAD (&cap->cb_head, cb, entries); +LIST_INSERT_HEAD (&cap->cb_head, cb, entries);return cap; }else {
@@ -1784,8 +1784,8 @@ CaptureVoiceOut *AUD_add_capture ( } hw = &cap->hw; -QEMU_LIST_INIT (&hw->sw_head); -QEMU_LIST_INIT (&cap->cb_head); +LIST_INIT (&hw->sw_head); +LIST_INIT (&cap->cb_head);/* XXX find a more elegant way */ hw->samples =4096 *4 ;
@@ -1813,8 +1813,8 @@ CaptureVoiceOut *AUD_add_capture ( [hw->info.swap_endianness] [hw->info.bits ==16 ]; -QEMU_LIST_INSERT_HEAD (&s->cap_head, cap, entries); -QEMU_LIST_INSERT_HEAD (&cap->cb_head, cb, entries); +LIST_INSERT_HEAD (&s->cap_head, cap, entries); +LIST_INSERT_HEAD (&cap->cb_head, cb, entries); hw =NULL ;while ((hw =audio_pcm_hw_find_any_out (s, hw))) {
@@ -1840,7 +1840,7 @@ void AUD_del_capture (CaptureVoiceOut *cfor (cb = cap->cb_head.lh_first; cb; cb = cb->entries.le_next) {if (cb->opaque == cb_opaque) { cb->ops.destroy (cb_opaque); -QEMU_LIST_REMOVE (cb, entries); +LIST_REMOVE (cb, entries);qemu_free (cb);if (!cap->cb_head.lh_first) {
@@ -1857,12 +1857,12 @@ void AUD_del_capture (CaptureVoiceOut *cst_rate_stop (sw->rate); sw->rate =NULL ; } -QEMU_LIST_REMOVE (sw, entries); -QEMU_LIST_REMOVE (sc, entries); +LIST_REMOVE (sw, entries); +LIST_REMOVE (sc, entries);qemu_free (sc); sw = sw1; } -QEMU_LIST_REMOVE (cap, entries); +LIST_REMOVE (cap, entries);qemu_free (cap); }return ;
tools/ioemu/audio/audio.h +2 -2
@@ -68,7 +68,7 @@ typedef struct CaptureState {typedef struct CaptureState {void *opaque;struct capture_ops ops; -QEMU_LIST_ENTRY (CaptureState) entries; +LIST_ENTRY (CaptureState) entries; }CaptureState ;typedef struct AudioState AudioState ;
@@ -79,7 +79,7 @@ typedef struct QEMUSoundCard {typedef struct QEMUSoundCard {AudioState *audio;char *name; -QEMU_LIST_ENTRY (QEMUSoundCard) entries; +LIST_ENTRY (QEMUSoundCard) entries; }QEMUSoundCard ; typedef struct QEMUAudioTimeStamp {
tools/ioemu/audio/audio_int.h +15 -15
@@ -79,10 +79,10 @@ typedef struct HWVoiceOut {st_sample_t *mix_buf;int samples; - QEMU_LIST_HEAD (sw_out_listhead, SWVoiceOut) sw_head; - QEMU_LIST_HEAD (sw_cap_listhead, SWVoiceCap) cap_head; + LIST_HEAD (sw_out_listhead, SWVoiceOut) sw_head; + LIST_HEAD (sw_cap_listhead, SWVoiceCap) cap_head;struct audio_pcm_ops *pcm_ops; -QEMU_LIST_ENTRY (HWVoiceOut) entries; +LIST_ENTRY (HWVoiceOut) entries; } HWVoiceOut; typedef struct HWVoiceIn {
@@ -98,9 +98,9 @@ typedef struct HWVoiceIn {st_sample_t *conv_buf;int samples; - QEMU_LIST_HEAD (sw_in_listhead, SWVoiceIn) sw_head; + LIST_HEAD (sw_in_listhead, SWVoiceIn) sw_head;struct audio_pcm_ops *pcm_ops; -QEMU_LIST_ENTRY (HWVoiceIn) entries; +LIST_ENTRY (HWVoiceIn) entries; } HWVoiceIn;struct SWVoiceOut {
@@ -116,7 +116,7 @@ struct SWVoiceOut {char *name;volume_t vol;struct audio_callback callback; -QEMU_LIST_ENTRY (SWVoiceOut) entries; +LIST_ENTRY (SWVoiceOut) entries; };struct SWVoiceIn {
@@ -131,7 +131,7 @@ struct SWVoiceIn {char *name;volume_t vol;struct audio_callback callback; -QEMU_LIST_ENTRY (SWVoiceIn) entries; +LIST_ENTRY (SWVoiceIn) entries; };struct audio_driver {
@@ -165,20 +165,20 @@ struct capture_callback {struct capture_callback {struct audio_capture_ops ops;void *opaque; -QEMU_LIST_ENTRY (capture_callback) entries; +LIST_ENTRY (capture_callback) entries; };struct CaptureVoiceOut {HWVoiceOut hw;void *buf; - QEMU_LIST_HEAD (cb_listhead, capture_callback) cb_head; -QEMU_LIST_ENTRY (CaptureVoiceOut) entries; + LIST_HEAD (cb_listhead, capture_callback) cb_head; +LIST_ENTRY (CaptureVoiceOut) entries; };struct SWVoiceCap {SWVoiceOut sw;CaptureVoiceOut *cap; -QEMU_LIST_ENTRY (SWVoiceCap) entries; +LIST_ENTRY (SWVoiceCap) entries; };struct AudioState {
@@ -186,10 +186,10 @@ struct AudioState {void *drv_opaque;QEMUTimer *ts; - QEMU_LIST_HEAD (card_listhead, QEMUSoundCard) card_head; - QEMU_LIST_HEAD (hw_in_listhead, HWVoiceIn) hw_head_in; - QEMU_LIST_HEAD (hw_out_listhead, HWVoiceOut) hw_head_out; - QEMU_LIST_HEAD (cap_listhead, CaptureVoiceOut) cap_head; + LIST_HEAD (card_listhead, QEMUSoundCard) card_head; + LIST_HEAD (hw_in_listhead, HWVoiceIn) hw_head_in; + LIST_HEAD (hw_out_listhead, HWVoiceOut) hw_head_out; + LIST_HEAD (cap_listhead, CaptureVoiceOut) cap_head;int nb_hw_voices_out;int nb_hw_voices_in; };
tools/ioemu/audio/audio_template.h +6 -6
@@ -186,12 +186,12 @@ static void glue (audio_pcm_sw_fini_, TYstatic void glue (audio_pcm_hw_add_sw_ ,TYPE ) (HW *hw,SW *sw) { -QEMU_LIST_INSERT_HEAD (&hw->sw_head, sw, entries); +LIST_INSERT_HEAD (&hw->sw_head, sw, entries); }static void glue (audio_pcm_hw_del_sw_ ,TYPE ) (SW *sw) { -QEMU_LIST_REMOVE (sw, entries); +LIST_REMOVE (sw, entries); }static void glue (audio_pcm_hw_gc_ ,TYPE ) (AudioState *s,HW **hwp)
@@ -202,7 +202,7 @@ static void glue (audio_pcm_hw_gc_, TYPE#ifdef DAC audio_detach_capture (hw);#endif -QEMU_LIST_REMOVE (hw, entries); +LIST_REMOVE (hw, entries);glue (s->nb_hw_voices_,TYPE ) +=1 ;glue (audio_pcm_hw_free_resources_ ,TYPE ) (hw);glue (hw->pcm_ops->fini_,TYPE ) (hw);
@@ -267,9 +267,9 @@ static HW *glue (audio_pcm_hw_add_new_, } hw->pcm_ops = drv->pcm_ops; -QEMU_LIST_INIT (&hw->sw_head); +LIST_INIT (&hw->sw_head);#ifdef DAC -QEMU_LIST_INIT (&hw->cap_head); +LIST_INIT (&hw->cap_head);#endif if (glue (hw->pcm_ops->init_,TYPE ) (hw, as)) { goto err0;
@@ -294,7 +294,7 @@ static HW *glue (audio_pcm_hw_add_new_, goto err1; } -QEMU_LIST_INSERT_HEAD (&s->glue (hw_head_,TYPE ), hw, entries); +LIST_INSERT_HEAD (&s->glue (hw_head_,TYPE ), hw, entries);glue (s->nb_hw_voices_,TYPE ) -=1 ;#ifdef DAC audio_attach_capture (s, hw);
tools/ioemu/audio/sys-queue.h +6 -6
@@ -64,12 +64,12 @@/* * List definitions. */ -#define QEMU_LIST_HEAD (name, type) \ +#define LIST_HEAD (name, type) \ struct name { \ struct type *lh_first;/* first element */ \ } -#define QEMU_LIST_ENTRY (type) \ +#define LIST_ENTRY (type) \ struct { \ struct type *le_next;/* next element */ \struct type **le_prev;/* address of previous next element */ \
@@ -78,11 +78,11 @@ struct { \/* * List functions. */ -#define QEMU_LIST_INIT (head) { \ +#define LIST_INIT (head) { \ (head)->lh_first = NULL; \ } -#define QEMU_LIST_INSERT_AFTER (listelm, elm, field) { \ +#define LIST_INSERT_AFTER (listelm, elm, field) { \ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ (listelm)->field.le_next->field.le_prev = \ &(elm)->field.le_next; \
@@ -90,14 +90,14 @@ struct { \ (elm)->field.le_prev = &(listelm)->field.le_next; \ } -#define QEMU_LIST_INSERT_HEAD (head, elm, field) { \ +#define LIST_INSERT_HEAD (head, elm, field) { \ if (((elm)->field.le_next = (head)->lh_first) != NULL) \ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ (head)->lh_first = (elm); \ (elm)->field.le_prev = &(head)->lh_first; \ } -#define QEMU_LIST_REMOVE (elm, field) { \ +#define LIST_REMOVE (elm, field) { \ if ((elm)->field.le_next != NULL) \ (elm)->field.le_next->field.le_prev = \ (elm)->field.le_prev; \
tools/ioemu/block-vbd.c +4 -4
@@ -50,10 +50,10 @@ typedef struct BDRVVbdState {struct blkfront_dev *dev;int fd;struct blkfront_info info; -QEMU_LIST_ENTRY (BDRVVbdState) list; +LIST_ENTRY (BDRVVbdState) list; } BDRVVbdState; -QEMU_LIST_HEAD(, BDRVVbdState) vbds; +LIST_HEAD(, BDRVVbdState) vbds;static int vbd_probe (const uint8_t *buf,int buf_size,const char *filename) {
@@ -90,7 +90,7 @@ static int vbd_open(BlockDriverState *bs s->fd =blkfront_open (s->dev);qemu_set_fd_handler (s->fd, vbd_io_completed,NULL , s); -QEMU_LIST_INSERT_HEAD (&vbds, s, list); +LIST_INSERT_HEAD (&vbds, s, list);return 0 ; }
@@ -302,7 +302,7 @@ static void vbd_close(BlockDriverState *close (s->fd); s->fd =-1 ; } -QEMU_LIST_REMOVE (s, list); +LIST_REMOVE (s, list); }static int64_t vbd_getlength (BlockDriverState *bs)
tools/ioemu/hw/pass-through.c +6 -6
@@ -1644,7 +1644,7 @@ static int pt_config_reg_init(struct pt_ reg_entry->data = data; }/* list add register entry */ -QEMU_LIST_INSERT_HEAD (®_grp->reg_tbl_head, reg_entry, entries); +LIST_INSERT_HEAD (®_grp->reg_tbl_head, reg_entry, entries); out:return err;
@@ -1659,7 +1659,7 @@ static int pt_config_init(struct pt_devint i, j, err =0 ;/* initialize register group list */ -QEMU_LIST_INIT (&ptdev->reg_grp_tbl_head); +LIST_INIT (&ptdev->reg_grp_tbl_head);/* initialize register group */ for (i=0 ; pt_emu_reg_grp_tbl[i].grp_size !=0 ; i++)
@@ -1682,12 +1682,12 @@ static int pt_config_init(struct pt_dev }/* initialize register group entry */ -QEMU_LIST_INIT (®_grp_entry->reg_tbl_head); +LIST_INIT (®_grp_entry->reg_tbl_head);/* need to declare here, to enable searching Cap Ptr reg * (which is in the same reg group) when initializing Status reg */ -QEMU_LIST_INSERT_HEAD (&ptdev->reg_grp_tbl_head, reg_grp_entry, entries); +LIST_INSERT_HEAD (&ptdev->reg_grp_tbl_head, reg_grp_entry, entries); reg_grp_entry->base_offset = reg_grp_offset; reg_grp_entry->reg_grp =
@@ -1740,11 +1740,11 @@ static void pt_config_delete(struct pt_d/* free all register entry */ while ((reg_entry = reg_grp_entry->reg_tbl_head.lh_first) !=NULL ) { -QEMU_LIST_REMOVE (reg_entry, entries); +LIST_REMOVE (reg_entry, entries);qemu_free (reg_entry); } -QEMU_LIST_REMOVE (reg_grp_entry, entries); +LIST_REMOVE (reg_grp_entry, entries);qemu_free (reg_grp_entry); } }
tools/ioemu/hw/pass-through.h +4 -4
@@ -136,7 +136,7 @@ struct pt_dev {PCIDevice dev;struct pci_dev *pci_dev;/* libpci struct */ struct pt_region bases[PCI_NUM_REGIONS ];/* Access regions */ - QEMU_LIST_HEAD (reg_grp_tbl_listhead, pt_reg_grp_tbl) reg_grp_tbl_head; + LIST_HEAD (reg_grp_tbl_listhead, pt_reg_grp_tbl) reg_grp_tbl_head;/* emul reg group list */ struct pt_msi_info *msi;/* MSI virtualization */ struct pt_msix_info *msix;/* MSI-X virtualization */
@@ -163,7 +163,7 @@ int pt_init(PCIBus * e_bus, char * direc/* emul reg group management table */ struct pt_reg_grp_tbl {/* emul reg group list */ -QEMU_LIST_ENTRY (pt_reg_grp_tbl) entries; +LIST_ENTRY (pt_reg_grp_tbl) entries;/* emul reg group info table */ struct pt_reg_grp_info_tbl *reg_grp;/* emul reg group base offset */
@@ -171,7 +171,7 @@ struct pt_reg_grp_tbl {/* emul reg group size */ uint8_t size;/* emul reg management table list */ - QEMU_LIST_HEAD (reg_tbl_listhead, pt_reg_tbl) reg_tbl_head; + LIST_HEAD (reg_tbl_listhead, pt_reg_tbl) reg_tbl_head; };/* emul reg group size initialize method */
@@ -195,7 +195,7 @@ struct pt_reg_grp_info_tbl {/* emul reg management table */ struct pt_reg_tbl {/* emul reg table list */ -QEMU_LIST_ENTRY (pt_reg_tbl) entries; +LIST_ENTRY (pt_reg_tbl) entries;/* emul reg info table */ struct pt_reg_info_tbl *reg;/* emul reg value */
tools/ioemu/monitor.c +3 -3
@@ -1167,7 +1167,7 @@ static void do_info_profile(void)#endif /* Capture support */ -static QEMU_LIST_HEAD (capture_list_head, CaptureState) capture_head; +static LIST_HEAD (capture_list_head, CaptureState) capture_head;static void do_info_capture (void ) {
@@ -1188,7 +1188,7 @@ static void do_stop_capture (int n)for (s = capture_head.lh_first, i =0 ; s; s = s->entries.le_next, ++i) {if (i == n) { s->ops.destroy (s->opaque); -QEMU_LIST_REMOVE (s, entries); +LIST_REMOVE (s, entries);qemu_free (s);return ; }
@@ -1220,7 +1220,7 @@ static void do_wav_capture (const char *term_printf ("Faied to add wave capture\n" ); qemu_free (s); } -QEMU_LIST_INSERT_HEAD (&capture_head, s, entries); +LIST_INSERT_HEAD (&capture_head, s, entries); }#endif
tools/ioemu/vl.c +7 -7
@@ -6155,10 +6155,10 @@ struct vm_change_state_entry {struct vm_change_state_entry {VMChangeStateHandler *cb;void *opaque; -QEMU_LIST_ENTRY (vm_change_state_entry) entries; -}; - -static QEMU_LIST_HEAD(vm_change_state_head, vm_change_state_entry) vm_change_state_head; +LIST_ENTRY (vm_change_state_entry) entries; +}; + +static LIST_HEAD(vm_change_state_head, vm_change_state_entry) vm_change_state_head;VMChangeStateEntry *qemu_add_vm_change_state_handler (VMChangeStateHandler *cb,void *opaque)
@@ -6171,13 +6171,13 @@ VMChangeStateEntry *qemu_add_vm_change_s e->cb = cb; e->opaque = opaque; -QEMU_LIST_INSERT_HEAD (&vm_change_state_head, e, entries); +LIST_INSERT_HEAD (&vm_change_state_head, e, entries);return e; }void qemu_del_vm_change_state_handler (VMChangeStateEntry *e) { -QEMU_LIST_REMOVE (e, entries); +LIST_REMOVE (e, entries);qemu_free (e); }
@@ -7106,7 +7106,7 @@ int main(int argc, char **argv) }#endif -QEMU_LIST_INIT (&vm_change_state_head); +LIST_INIT (&vm_change_state_head); #ifndef CONFIG_STUBDOM #ifndef _WIN32 {
(who just ran s/// commands :) )
PATCH 1/1 drop QEMU_ prefix from QEMU_LIST_*
In reply to Samuel Thibaultdrop QEMU_ prefix from QEMU_LIST_*
audio/audio.c +19 -19
@@ -793,8 +793,8 @@ static void audio_detach_capture (HWVoiceOut *hw) sw->rate =NULL ; } -QEMU_LIST_REMOVE (sw, entries); -QEMU_LIST_REMOVE (sc, entries); +LIST_REMOVE (sw, entries); +LIST_REMOVE (sc, entries);qemu_free (sc);if (was_active) {/* We have removed soft voice from the capture:
@@ -837,8 +837,8 @@ static int audio_attach_capture (AudioState *s, HWVoiceOut *hw)qemu_free (sw);return -1 ; } -QEMU_LIST_INSERT_HEAD (&hw_cap->sw_head, sw, entries); -QEMU_LIST_INSERT_HEAD (&hw->cap_head, sc, entries); +LIST_INSERT_HEAD (&hw_cap->sw_head, sw, entries); +LIST_INSERT_HEAD (&hw->cap_head, sc, entries);#ifdef DEBUG_CAPTURE asprintf (&sw->name,"for %p %d,%d,%d" , hw, sw->info.freq, sw->info.bits, sw->info.nchannels);
@@ -1706,12 +1706,12 @@ void AUD_register_card (AudioState *s, const char *name, QEMUSoundCard *card) card->audio = s; card->name =qemu_strdup (name);memset (&card->entries,0 ,sizeof (card->entries)); -QEMU_LIST_INSERT_HEAD (&s->card_head, card, entries); +LIST_INSERT_HEAD (&s->card_head, card, entries); }void AUD_remove_card (QEMUSoundCard *card) { -QEMU_LIST_REMOVE (card, entries); +LIST_REMOVE (card, entries); card->audio =NULL ;qemu_free (card->name); }
@@ -1723,9 +1723,9 @@ AudioState *AUD_init (void)const char *drvname;AudioState *s = &glob_audio_state; -QEMU_LIST_INIT (&s->hw_head_out); -QEMU_LIST_INIT (&s->hw_head_in); -QEMU_LIST_INIT (&s->cap_head); +LIST_INIT (&s->hw_head_out); +LIST_INIT (&s->hw_head_in); +LIST_INIT (&s->cap_head);atexit (audio_atexit); s->ts =qemu_new_timer (vm_clock, audio_timer, s);
@@ -1817,7 +1817,7 @@ AudioState *AUD_init (void)return NULL ; } -QEMU_LIST_INIT (&s->card_head); +LIST_INIT (&s->card_head);register_savevm ("audio" ,0 ,1 , audio_save, audio_load, s);qemu_mod_timer (s->ts,qemu_get_clock (vm_clock) + conf.period.ticks);return s;
@@ -1855,7 +1855,7 @@ CaptureVoiceOut *AUD_add_capture ( cap =audio_pcm_capture_find_specific (s, as);if (cap) { -QEMU_LIST_INSERT_HEAD (&cap->cb_head, cb, entries); +LIST_INSERT_HEAD (&cap->cb_head, cb, entries);return cap; }else {
@@ -1870,8 +1870,8 @@ CaptureVoiceOut *AUD_add_capture ( } hw = &cap->hw; -QEMU_LIST_INIT (&hw->sw_head); -QEMU_LIST_INIT (&cap->cb_head); +LIST_INIT (&hw->sw_head); +LIST_INIT (&cap->cb_head);/* XXX find a more elegant way */ hw->samples =4096 *4 ;
@@ -1899,8 +1899,8 @@ CaptureVoiceOut *AUD_add_capture ( [hw->info.swap_endianness] [audio_bits_to_index (hw->info.bits)]; -QEMU_LIST_INSERT_HEAD (&s->cap_head, cap, entries); -QEMU_LIST_INSERT_HEAD (&cap->cb_head, cb, entries); +LIST_INSERT_HEAD (&s->cap_head, cap, entries); +LIST_INSERT_HEAD (&cap->cb_head, cb, entries); hw =NULL ;while ((hw =audio_pcm_hw_find_any_out (s, hw))) {
@@ -1926,7 +1926,7 @@ void AUD_del_capture (CaptureVoiceOut *cap, void *cb_opaque)for (cb = cap->cb_head.lh_first; cb; cb = cb->entries.le_next) {if (cb->opaque == cb_opaque) { cb->ops.destroy (cb_opaque); -QEMU_LIST_REMOVE (cb, entries); +LIST_REMOVE (cb, entries);qemu_free (cb);if (!cap->cb_head.lh_first) {
@@ -1943,12 +1943,12 @@ void AUD_del_capture (CaptureVoiceOut *cap, void *cb_opaque)st_rate_stop (sw->rate); sw->rate =NULL ; } -QEMU_LIST_REMOVE (sw, entries); -QEMU_LIST_REMOVE (sc, entries); +LIST_REMOVE (sw, entries); +LIST_REMOVE (sc, entries);qemu_free (sc); sw = sw1; } -QEMU_LIST_REMOVE (cap, entries); +LIST_REMOVE (cap, entries);qemu_free (cap); }return ;
audio/audio.h +2 -2
@@ -70,7 +70,7 @@ struct capture_ops {typedef struct CaptureState {void *opaque;struct capture_ops ops; -QEMU_LIST_ENTRY (CaptureState) entries; +LIST_ENTRY (CaptureState) entries; }CaptureState ;typedef struct SWVoiceOut SWVoiceOut ;
@@ -80,7 +80,7 @@ typedef struct SWVoiceIn SWVoiceIn;typedef struct QEMUSoundCard {AudioState *audio;char *name; -QEMU_LIST_ENTRY (QEMUSoundCard) entries; +LIST_ENTRY (QEMUSoundCard) entries; }QEMUSoundCard ; typedef struct QEMUAudioTimeStamp {
audio/audio_int.h +15 -15
@@ -79,10 +79,10 @@ typedef struct HWVoiceOut {st_sample_t *mix_buf;int samples; - QEMU_LIST_HEAD (sw_out_listhead, SWVoiceOut) sw_head; - QEMU_LIST_HEAD (sw_cap_listhead, SWVoiceCap) cap_head; + LIST_HEAD (sw_out_listhead, SWVoiceOut) sw_head; + LIST_HEAD (sw_cap_listhead, SWVoiceCap) cap_head;struct audio_pcm_ops *pcm_ops; -QEMU_LIST_ENTRY (HWVoiceOut) entries; +LIST_ENTRY (HWVoiceOut) entries; } HWVoiceOut; typedef struct HWVoiceIn {
@@ -98,9 +98,9 @@ typedef struct HWVoiceIn {st_sample_t *conv_buf;int samples; - QEMU_LIST_HEAD (sw_in_listhead, SWVoiceIn) sw_head; + LIST_HEAD (sw_in_listhead, SWVoiceIn) sw_head;struct audio_pcm_ops *pcm_ops; -QEMU_LIST_ENTRY (HWVoiceIn) entries; +LIST_ENTRY (HWVoiceIn) entries; } HWVoiceIn;struct SWVoiceOut {
@@ -116,7 +116,7 @@ struct SWVoiceOut {char *name;volume_t vol;struct audio_callback callback; -QEMU_LIST_ENTRY (SWVoiceOut) entries; +LIST_ENTRY (SWVoiceOut) entries; };struct SWVoiceIn {
@@ -131,7 +131,7 @@ struct SWVoiceIn {char *name;volume_t vol;struct audio_callback callback; -QEMU_LIST_ENTRY (SWVoiceIn) entries; +LIST_ENTRY (SWVoiceIn) entries; };struct audio_driver {
@@ -165,20 +165,20 @@ struct audio_pcm_ops {struct capture_callback {struct audio_capture_ops ops;void *opaque; -QEMU_LIST_ENTRY (capture_callback) entries; +LIST_ENTRY (capture_callback) entries; };struct CaptureVoiceOut {HWVoiceOut hw;void *buf; - QEMU_LIST_HEAD (cb_listhead, capture_callback) cb_head; -QEMU_LIST_ENTRY (CaptureVoiceOut) entries; + LIST_HEAD (cb_listhead, capture_callback) cb_head; +LIST_ENTRY (CaptureVoiceOut) entries; };struct SWVoiceCap {SWVoiceOut sw;CaptureVoiceOut *cap; -QEMU_LIST_ENTRY (SWVoiceCap) entries; +LIST_ENTRY (SWVoiceCap) entries; };struct AudioState {
@@ -186,10 +186,10 @@ struct AudioState {void *drv_opaque;QEMUTimer *ts; - QEMU_LIST_HEAD (card_listhead, QEMUSoundCard) card_head; - QEMU_LIST_HEAD (hw_in_listhead, HWVoiceIn) hw_head_in; - QEMU_LIST_HEAD (hw_out_listhead, HWVoiceOut) hw_head_out; - QEMU_LIST_HEAD (cap_listhead, CaptureVoiceOut) cap_head; + LIST_HEAD (card_listhead, QEMUSoundCard) card_head; + LIST_HEAD (hw_in_listhead, HWVoiceIn) hw_head_in; + LIST_HEAD (hw_out_listhead, HWVoiceOut) hw_head_out; + LIST_HEAD (cap_listhead, CaptureVoiceOut) cap_head;int nb_hw_voices_out;int nb_hw_voices_in; };
audio/audio_template.h +6 -6
@@ -186,12 +186,12 @@ static void glue (audio_pcm_sw_fini_, TYPE) (SW *sw)static void glue (audio_pcm_hw_add_sw_ ,TYPE ) (HW *hw,SW *sw) { -QEMU_LIST_INSERT_HEAD (&hw->sw_head, sw, entries); +LIST_INSERT_HEAD (&hw->sw_head, sw, entries); }static void glue (audio_pcm_hw_del_sw_ ,TYPE ) (SW *sw) { -QEMU_LIST_REMOVE (sw, entries); +LIST_REMOVE (sw, entries); }static void glue (audio_pcm_hw_gc_ ,TYPE ) (AudioState *s,HW **hwp)
@@ -202,7 +202,7 @@ static void glue (audio_pcm_hw_gc_, TYPE) (AudioState *s, HW **hwp)#ifdef DAC audio_detach_capture (hw);#endif -QEMU_LIST_REMOVE (hw, entries); +LIST_REMOVE (hw, entries);glue (s->nb_hw_voices_,TYPE ) +=1 ;glue (audio_pcm_hw_free_resources_ ,TYPE ) (hw);glue (hw->pcm_ops->fini_,TYPE ) (hw);
@@ -267,9 +267,9 @@ static HW *glue (audio_pcm_hw_add_new_, TYPE) (AudioState *s, audsettings_t *as) } hw->pcm_ops = drv->pcm_ops; -QEMU_LIST_INIT (&hw->sw_head); +LIST_INIT (&hw->sw_head);#ifdef DAC -QEMU_LIST_INIT (&hw->cap_head); +LIST_INIT (&hw->cap_head);#endif if (glue (hw->pcm_ops->init_,TYPE ) (hw, as)) { goto err0;
@@ -294,7 +294,7 @@ static HW *glue (audio_pcm_hw_add_new_, TYPE) (AudioState *s, audsettings_t *as) goto err1; } -QEMU_LIST_INSERT_HEAD (&s->glue (hw_head_,TYPE ), hw, entries); +LIST_INSERT_HEAD (&s->glue (hw_head_,TYPE ), hw, entries);glue (s->nb_hw_voices_,TYPE ) -=1 ;#ifdef DAC audio_attach_capture (s, hw);
audio/sys-queue.h +6 -6
@@ -64,12 +64,12 @@/* * List definitions. */ -#define QEMU_LIST_HEAD (name, type) \ +#define LIST_HEAD (name, type) \ struct name { \ struct type *lh_first;/* first element */ \ } -#define QEMU_LIST_ENTRY (type) \ +#define LIST_ENTRY (type) \ struct { \ struct type *le_next;/* next element */ \struct type **le_prev;/* address of previous next element */ \
@@ -78,11 +78,11 @@ struct { \/* * List functions. */ -#define QEMU_LIST_INIT (head) { \ +#define LIST_INIT (head) { \ (head)->lh_first = NULL; \ } -#define QEMU_LIST_INSERT_AFTER (listelm, elm, field) { \ +#define LIST_INSERT_AFTER (listelm, elm, field) { \ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ (listelm)->field.le_next->field.le_prev = \ &(elm)->field.le_next; \
@@ -90,14 +90,14 @@ struct { \ (elm)->field.le_prev = &(listelm)->field.le_next; \ } -#define QEMU_LIST_INSERT_HEAD (head, elm, field) { \ +#define LIST_INSERT_HEAD (head, elm, field) { \ if (((elm)->field.le_next = (head)->lh_first) != NULL) \ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ (head)->lh_first = (elm); \ (elm)->field.le_prev = &(head)->lh_first; \ } -#define QEMU_LIST_REMOVE (elm, field) { \ +#define LIST_REMOVE (elm, field) { \ if ((elm)->field.le_next != NULL) \ (elm)->field.le_next->field.le_prev = \ (elm)->field.le_prev; \
block-vbd.c +4 -4
@@ -51,10 +51,10 @@ typedef struct BDRVVbdState {struct blkfront_dev *dev;int fd;struct blkfront_info info; -QEMU_LIST_ENTRY (BDRVVbdState) list; +LIST_ENTRY (BDRVVbdState) list; } BDRVVbdState; -QEMU_LIST_HEAD(, BDRVVbdState) vbds; +LIST_HEAD(, BDRVVbdState) vbds;static int vbd_probe (const uint8_t *buf,int buf_size,const char *filename) {
@@ -91,7 +91,7 @@ static int vbd_open(BlockDriverState *bs, const char *filename, int flags) s->fd =blkfront_open (s->dev);qemu_set_fd_handler (s->fd, vbd_io_completed,NULL , s); -QEMU_LIST_INSERT_HEAD (&vbds, s, list); +LIST_INSERT_HEAD (&vbds, s, list);return 0 ; }
@@ -303,7 +303,7 @@ static void vbd_close(BlockDriverState *bs)close (s->fd); s->fd =-1 ; } -QEMU_LIST_REMOVE (s, list); +LIST_REMOVE (s, list); }static int64_t vbd_getlength (BlockDriverState *bs)
hw/pass-through.c +6 -6
@@ -1640,7 +1640,7 @@ static int pt_config_reg_init(struct pt_dev *ptdev, reg_entry->data = data; }/* list add register entry */ -QEMU_LIST_INSERT_HEAD (®_grp->reg_tbl_head, reg_entry, entries); +LIST_INSERT_HEAD (®_grp->reg_tbl_head, reg_entry, entries); out:return err;
@@ -1655,7 +1655,7 @@ static int pt_config_init(struct pt_dev *ptdev)int i, j, err =0 ;/* initialize register group list */ -QEMU_LIST_INIT (&ptdev->reg_grp_tbl_head); +LIST_INIT (&ptdev->reg_grp_tbl_head);/* initialize register group */ for (i=0 ; pt_emu_reg_grp_tbl[i].grp_size !=0 ; i++)
@@ -1678,12 +1678,12 @@ static int pt_config_init(struct pt_dev *ptdev) }/* initialize register group entry */ -QEMU_LIST_INIT (®_grp_entry->reg_tbl_head); +LIST_INIT (®_grp_entry->reg_tbl_head);/* need to declare here, to enable searching Cap Ptr reg * (which is in the same reg group) when initializing Status reg */ -QEMU_LIST_INSERT_HEAD (&ptdev->reg_grp_tbl_head, reg_grp_entry, entries); +LIST_INSERT_HEAD (&ptdev->reg_grp_tbl_head, reg_grp_entry, entries); reg_grp_entry->base_offset = reg_grp_offset; reg_grp_entry->reg_grp =
@@ -1736,11 +1736,11 @@ static void pt_config_delete(struct pt_dev *ptdev)/* free all register entry */ while ((reg_entry = reg_grp_entry->reg_tbl_head.lh_first) !=NULL ) { -QEMU_LIST_REMOVE (reg_entry, entries); +LIST_REMOVE (reg_entry, entries);qemu_free (reg_entry); } -QEMU_LIST_REMOVE (reg_grp_entry, entries); +LIST_REMOVE (reg_grp_entry, entries);qemu_free (reg_grp_entry); } }
hw/pass-through.h +4 -4
@@ -138,7 +138,7 @@ struct pt_dev {PCIDevice dev;struct pci_dev *pci_dev;/* libpci struct */ struct pt_region bases[PCI_NUM_REGIONS ];/* Access regions */ - QEMU_LIST_HEAD (reg_grp_tbl_listhead, pt_reg_grp_tbl) reg_grp_tbl_head; + LIST_HEAD (reg_grp_tbl_listhead, pt_reg_grp_tbl) reg_grp_tbl_head;/* emul reg group list */ struct pt_msi_info *msi;/* MSI virtualization */ struct pt_msix_info *msix;/* MSI-X virtualization */
@@ -163,7 +163,7 @@ struct pci_config_cf8 {/* emul reg group management table */ struct pt_reg_grp_tbl {/* emul reg group list */ -QEMU_LIST_ENTRY (pt_reg_grp_tbl) entries; +LIST_ENTRY (pt_reg_grp_tbl) entries;/* emul reg group info table */ struct pt_reg_grp_info_tbl *reg_grp;/* emul reg group base offset */
@@ -171,7 +171,7 @@ struct pt_reg_grp_tbl {/* emul reg group size */ uint8_t size;/* emul reg management table list */ - QEMU_LIST_HEAD (reg_tbl_listhead, pt_reg_tbl) reg_tbl_head; + LIST_HEAD (reg_tbl_listhead, pt_reg_tbl) reg_tbl_head; };/* emul reg group size initialize method */
@@ -195,7 +195,7 @@ struct pt_reg_grp_info_tbl {/* emul reg management table */ struct pt_reg_tbl {/* emul reg table list */ -QEMU_LIST_ENTRY (pt_reg_tbl) entries; +LIST_ENTRY (pt_reg_tbl) entries;/* emul reg info table */ struct pt_reg_info_tbl *reg;/* emul reg value */
monitor.c +3 -3
@@ -1243,7 +1243,7 @@ static void do_info_profile(void)#endif /* Capture support */ -static QEMU_LIST_HEAD (capture_list_head, CaptureState) capture_head; +static LIST_HEAD (capture_list_head, CaptureState) capture_head;static void do_info_capture (void ) {
@@ -1264,7 +1264,7 @@ static void do_stop_capture (int n)for (s = capture_head.lh_first, i =0 ; s; s = s->entries.le_next, ++i) {if (i == n) { s->ops.destroy (s->opaque); -QEMU_LIST_REMOVE (s, entries); +LIST_REMOVE (s, entries);qemu_free (s);return ; }
@@ -1296,7 +1296,7 @@ static void do_wav_capture (const char *path,term_printf ("Faied to add wave capture\n" ); qemu_free (s); } -QEMU_LIST_INSERT_HEAD (&capture_head, s, entries); +LIST_INSERT_HEAD (&capture_head, s, entries); }#endif
vl.c +5 -5
@@ -6873,10 +6873,10 @@ static void gui_update(void *opaque)struct vm_change_state_entry {VMChangeStateHandler *cb;void *opaque; -QEMU_LIST_ENTRY (vm_change_state_entry) entries; +LIST_ENTRY (vm_change_state_entry) entries; }; -static QEMU_LIST_HEAD(vm_change_state_head, vm_change_state_entry) vm_change_state_head; +static LIST_HEAD(vm_change_state_head, vm_change_state_entry) vm_change_state_head;VMChangeStateEntry *qemu_add_vm_change_state_handler (VMChangeStateHandler *cb,void *opaque)
@@ -6889,13 +6889,13 @@ VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb, e->cb = cb; e->opaque = opaque; -QEMU_LIST_INSERT_HEAD (&vm_change_state_head, e, entries); +LIST_INSERT_HEAD (&vm_change_state_head, e, entries);return e; }void qemu_del_vm_change_state_handler (VMChangeStateEntry *e) { -QEMU_LIST_REMOVE (e, entries); +LIST_REMOVE (e, entries);qemu_free (e); }
@@ -7894,7 +7894,7 @@ int main(int argc, char **argv)perror ("setrlimit(RLIMIT_MEMLOCK)" );#endif -QEMU_LIST_INIT (&vm_change_state_head); +LIST_INIT (&vm_change_state_head);#ifndef _WIN32 {struct sigaction act;
Re: [PATCH] drop QEMU_ prefix from QEMU_LIST_*
Oh actually that one should have gone to the qemu branch of the qemu-xen repository.
Samuel
Quoted 3 lines · Samuel Thibault
prefix mini-os lists with
minios_, dropQEMU_prefix from QEMU_LIST_*That permits to reduce the amount of difference with upstream.
Do the ioemu portions belong in Ian Jackson's tree (no caps ;-) too?
-- Keir
Quoted 7 lines · Keir Fraser
Quoted 3 lines · Samuel Thibault
prefix mini-os lists with
minios_, dropQEMU_prefix from QEMU_LIST_*That permits to reduce the amount of difference with upstream.
Do the ioemu portions belong in Ian Jackson's tree (no caps ;-) too?
Oh, you sent a separate patch. Good.
-- Keir