aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/include
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-08-08 10:48:48 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-08-08 10:48:48 +0100
commita9c83dc7200c3705e8c6df15d29ceb30cf6f0a45 (patch)
tree054b66ef22fa20ad08cbc739791f9695647c00c8 /extras/mini-os/include
parent480d1476fcfffbd3193a3f46182c66e013bc3285 (diff)
downloadxen-a9c83dc7200c3705e8c6df15d29ceb30cf6f0a45.tar.gz
xen-a9c83dc7200c3705e8c6df15d29ceb30cf6f0a45.tar.bz2
xen-a9c83dc7200c3705e8c6df15d29ceb30cf6f0a45.zip
prefix mini-os lists with minios_, drop QEMU_ prefix from QEMU_LIST_*
That permits to reduce the amount of difference with upstream. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/include')
-rw-r--r--extras/mini-os/include/fs.h2
-rw-r--r--extras/mini-os/include/list.h114
-rw-r--r--extras/mini-os/include/sched.h2
-rw-r--r--extras/mini-os/include/semaphore.h2
-rw-r--r--extras/mini-os/include/wait.h18
-rw-r--r--extras/mini-os/include/waittypes.h4
6 files changed, 71 insertions, 71 deletions
diff --git a/extras/mini-os/include/fs.h b/extras/mini-os/include/fs.h
index cd8262e54d..aa19135822 100644
--- a/extras/mini-os/include/fs.h
+++ b/extras/mini-os/include/fs.h
@@ -13,7 +13,7 @@ struct fs_import
domid_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) */
diff --git a/extras/mini-os/include/list.h b/extras/mini-os/include/list.h
index fbb1fa8cc0..a60ae23431 100644
--- a/extras/mini-os/include/list.h
+++ b/extras/mini-os/include/list.h
@@ -11,23 +11,23 @@
* using the generic single-entry routines.
*/
-struct list_head {
- struct list_head *next, *prev;
+struct minios_list_head {
+ struct minios_list_head *next, *prev;
};
-#define LIST_HEAD_INIT(name) { &(name), &(name) }
+#define MINIOS_LIST_HEAD_INIT(name) { &(name), &(name) }
-#define LIST_HEAD(name) \
- struct list_head name = LIST_HEAD_INIT(name)
+#define MINIOS_LIST_HEAD(name) \
+ struct minios_list_head name = MINIOS_LIST_HEAD_INIT(name)
-#define INIT_LIST_HEAD(ptr) do { \
+#define MINIOS_INIT_LIST_HEAD(ptr) do { \
(ptr)->next = (ptr); (ptr)->prev = (ptr); \
} while (0)
-#define list_top(head, type, member) \
+#define minios_list_top(head, type, member) \
({ \
- struct list_head *_head = (head); \
- list_empty(_head) ? NULL : list_entry(_head->next, type, member); \
+ struct minios_list_head *_head = (head); \
+ minios_list_empty(_head) ? NULL : minios_list_entry(_head->next, type, member); \
})
/*
@@ -36,9 +36,9 @@ struct list_head {
* This is only for internal list manipulation where we know
* the prev/next entries already!
*/
-static __inline__ void __list_add(struct list_head * new,
- struct list_head * prev,
- struct list_head * next)
+static __inline__ void __minios_list_add(struct minios_list_head * new,
+ struct minios_list_head * prev,
+ struct minios_list_head * next)
{
next->prev = new;
new->next = next;
@@ -47,29 +47,29 @@ static __inline__ void __list_add(struct list_head * new,
}
/**
- * list_add - add a new entry
+ * minios_list_add - add a new entry
* @new: new entry to be added
* @head: list head to add it after
*
* Insert a new entry after the specified head.
* This is good for implementing stacks.
*/
-static __inline__ void list_add(struct list_head *new, struct list_head *head)
+static __inline__ void minios_list_add(struct minios_list_head *new, struct minios_list_head *head)
{
- __list_add(new, head, head->next);
+ __minios_list_add(new, head, head->next);
}
/**
- * list_add_tail - add a new entry
+ * minios_list_add_tail - add a new entry
* @new: new entry to be added
* @head: list head to add it before
*
* Insert a new entry before the specified head.
* This is useful for implementing queues.
*/
-static __inline__ void list_add_tail(struct list_head *new, struct list_head *head)
+static __inline__ void minios_list_add_tail(struct minios_list_head *new, struct minios_list_head *head)
{
- __list_add(new, head->prev, head);
+ __minios_list_add(new, head->prev, head);
}
/*
@@ -79,54 +79,54 @@ static __inline__ void list_add_tail(struct list_head *new, struct list_head *he
* This is only for internal list manipulation where we know
* the prev/next entries already!
*/
-static __inline__ void __list_del(struct list_head * prev,
- struct list_head * next)
+static __inline__ void __minios_list_del(struct minios_list_head * prev,
+ struct minios_list_head * next)
{
next->prev = prev;
prev->next = next;
}
/**
- * list_del - deletes entry from list.
+ * minios_list_del - deletes entry from list.
* @entry: the element to delete from the list.
- * Note: list_empty on entry does not return true after this, the entry is in an undefined state.
+ * Note: minios_list_empty on entry does not return true after this, the entry is in an undefined state.
*/
-static __inline__ void list_del(struct list_head *entry)
+static __inline__ void minios_list_del(struct minios_list_head *entry)
{
- __list_del(entry->prev, entry->next);
+ __minios_list_del(entry->prev, entry->next);
}
/**
- * list_del_init - deletes entry from list and reinitialize it.
+ * minios_list_del_init - deletes entry from list and reinitialize it.
* @entry: the element to delete from the list.
*/
-static __inline__ void list_del_init(struct list_head *entry)
+static __inline__ void minios_list_del_init(struct minios_list_head *entry)
{
- __list_del(entry->prev, entry->next);
- INIT_LIST_HEAD(entry);
+ __minios_list_del(entry->prev, entry->next);
+ MINIOS_INIT_LIST_HEAD(entry);
}
/**
- * list_empty - tests whether a list is empty
+ * minios_list_empty - tests whether a list is empty
* @head: the list to test.
*/
-static __inline__ int list_empty(struct list_head *head)
+static __inline__ int minios_list_empty(struct minios_list_head *head)
{
return head->next == head;
}
/**
- * list_splice - join two lists
+ * minios_list_splice - join two lists
* @list: the new list to add.
* @head: the place to add it in the first list.
*/
-static __inline__ void list_splice(struct list_head *list, struct list_head *head)
+static __inline__ void minios_list_splice(struct minios_list_head *list, struct minios_list_head *head)
{
- struct list_head *first = list->next;
+ struct minios_list_head *first = list->next;
if (first != list) {
- struct list_head *last = list->prev;
- struct list_head *at = head->next;
+ struct minios_list_head *last = list->prev;
+ struct minios_list_head *at = head->next;
first->prev = head;
head->next = first;
@@ -137,54 +137,54 @@ static __inline__ void list_splice(struct list_head *list, struct list_head *hea
}
/**
- * list_entry - get the struct for this entry
- * @ptr: the &struct list_head pointer.
+ * minios_list_entry - get the struct for this entry
+ * @ptr: the &struct minios_list_head pointer.
* @type: the type of the struct this is embedded in.
- * @member: the name of the list_struct within the struct.
+ * @member: the name of the minios_list_struct within the struct.
*/
-#define list_entry(ptr, type, member) \
+#define minios_list_entry(ptr, type, member) \
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
/**
- * list_for_each - iterate over a list
- * @pos: the &struct list_head to use as a loop counter.
+ * minios_list_for_each - iterate over a list
+ * @pos: the &struct minios_list_head to use as a loop counter.
* @head: the head for your list.
*/
-#define list_for_each(pos, head) \
+#define minios_list_for_each(pos, head) \
for (pos = (head)->next; pos != (head); pos = pos->next)
/**
- * list_for_each_safe - iterate over a list safe against removal of list entry
- * @pos: the &struct list_head to use as a loop counter.
- * @n: another &struct list_head to use as temporary storage
+ * minios_list_for_each_safe - iterate over a list safe against removal of list entry
+ * @pos: the &struct minios_list_head to use as a loop counter.
+ * @n: another &struct minios_list_head to use as temporary storage
* @head: the head for your list.
*/
-#define list_for_each_safe(pos, n, head) \
+#define minios_list_for_each_safe(pos, n, head) \
for (pos = (head)->next, n = pos->next; pos != (head); \
pos = n, n = pos->next)
/**
- * list_for_each_entry - iterate over list of given type
+ * minios_list_for_each_entry - iterate over list of given type
* @pos: the type * to use as a loop counter.
* @head: the head for your list.
- * @member: the name of the list_struct within the struct.
+ * @member: the name of the minios_list_struct within the struct.
*/
-#define list_for_each_entry(pos, head, member) \
- for (pos = list_entry((head)->next, typeof(*pos), member); \
+#define minios_list_for_each_entry(pos, head, member) \
+ for (pos = minios_list_entry((head)->next, typeof(*pos), member); \
&pos->member != (head); \
- pos = list_entry(pos->member.next, typeof(*pos), member))
+ pos = minios_list_entry(pos->member.next, typeof(*pos), member))
/**
- * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry
+ * minios_list_for_each_entry_safe - iterate over list of given type safe against removal of list entry
* @pos: the type * to use as a loop counter.
* @n: another type * to use as temporary storage
* @head: the head for your list.
- * @member: the name of the list_struct within the struct.
+ * @member: the name of the minios_list_struct within the struct.
*/
-#define list_for_each_entry_safe(pos, n, head, member) \
- for (pos = list_entry((head)->next, typeof(*pos), member), \
- n = list_entry(pos->member.next, typeof(*pos), member); \
+#define minios_list_for_each_entry_safe(pos, n, head, member) \
+ for (pos = minios_list_entry((head)->next, typeof(*pos), member), \
+ n = minios_list_entry(pos->member.next, typeof(*pos), member); \
&pos->member != (head); \
- pos = n, n = list_entry(n->member.next, typeof(*n), member))
+ pos = n, n = minios_list_entry(n->member.next, typeof(*n), member))
#endif /* _LINUX_LIST_H */
diff --git a/extras/mini-os/include/sched.h b/extras/mini-os/include/sched.h
index b3dab8dc6c..3359439b55 100644
--- a/extras/mini-os/include/sched.h
+++ b/extras/mini-os/include/sched.h
@@ -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
diff --git a/extras/mini-os/include/semaphore.h b/extras/mini-os/include/semaphore.h
index 368d09ecb4..8236046714 100644
--- a/extras/mini-os/include/semaphore.h
+++ b/extras/mini-os/include/semaphore.h
@@ -21,7 +21,7 @@ struct semaphore
struct rw_semaphore {
signed long count;
spinlock_t wait_lock;
- struct list_head wait_list;
+ struct minios_list_head wait_list;
int debug;
};
diff --git a/extras/mini-os/include/wait.h b/extras/mini-os/include/wait.h
index 2dc109b4f7..14e98ba755 100644
--- a/extras/mini-os/include/wait.h
+++ b/extras/mini-os/include/wait.h
@@ -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);
diff --git a/extras/mini-os/include/waittypes.h b/extras/mini-os/include/waittypes.h
index 326eef0f45..1215ffe0be 100644
--- a/extras/mini-os/include/waittypes.h
+++ b/extras/mini-os/include/waittypes.h
@@ -7,13 +7,13 @@ struct thread;
struct 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) \