summaryrefslogtreecommitdiffstats
path: root/spice/ipc_ring.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-02-04 16:46:27 +0100
committerAlexander Larsson <alexl@redhat.com>2010-02-04 16:46:27 +0100
commit90352580a0fe2b6fdc060a9f0916636383f87e09 (patch)
tree7d8f2a3ae4c3e43ec8a10e174b8088a7d2d665e3 /spice/ipc_ring.h
parentb0188a46d1d028f2fcee1cad18d010b118d7a996 (diff)
downloadspice-protocol-90352580a0fe2b6fdc060a9f0916636383f87e09.tar.gz
spice-protocol-90352580a0fe2b6fdc060a9f0916636383f87e09.tar.xz
spice-protocol-90352580a0fe2b6fdc060a9f0916636383f87e09.zip
Rename all identifiers
This is just the result of running: ./rename-identifiers.sh renames spice/*.h
Diffstat (limited to 'spice/ipc_ring.h')
-rw-r--r--spice/ipc_ring.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/spice/ipc_ring.h b/spice/ipc_ring.h
index 0011667..2de6470 100644
--- a/spice/ipc_ring.h
+++ b/spice/ipc_ring.h
@@ -68,7 +68,7 @@
-#define RING_DECLARE(name, el_type, size) \
+#define SPICE_RING_DECLARE(name, el_type, size) \
typedef struct SPICE_ATTR_PACKED name##_ring_el { \
union { \
el_type el; \
@@ -86,7 +86,7 @@ typedef struct SPICE_ATTR_PACKED name { \
} name;
-#define RING_INIT(r) \
+#define SPICE_RING_INIT(r) \
(r)->num_items = sizeof((r)->items) >> \
PAWER2_TO_SHIFT(sizeof((r)->items[0])); \
(r)->prod = (r)->cons = 0; \
@@ -94,39 +94,39 @@ typedef struct SPICE_ATTR_PACKED name { \
(r)->notify_on_cons = 0;
-#define RING_INDEX_MASK(r) ((r)->num_items - 1)
+#define SPICE_RING_INDEX_MASK(r) ((r)->num_items - 1)
-#define RING_IS_PACKED(r) (sizeof((r)->items[0]) == sizeof((r)->items[0]).el)
+#define SPICE_RING_IS_PACKED(r) (sizeof((r)->items[0]) == sizeof((r)->items[0]).el)
-#define RING_IS_EMPTY(r) ((r)->cons == (r)->prod)
+#define SPICE_RING_IS_EMPTY(r) ((r)->cons == (r)->prod)
-#define RING_IS_FULL(r) (((r)->prod - (r)->cons) == (r)->num_items)
+#define SPICE_RING_IS_FULL(r) (((r)->prod - (r)->cons) == (r)->num_items)
-#define RING_PROD_ITEM(r) (&(r)->items[(r)->prod & RING_INDEX_MASK(r)].el)
+#define SPICE_RING_PROD_ITEM(r) (&(r)->items[(r)->prod & SPICE_RING_INDEX_MASK(r)].el)
-#define RING_PROD_WAIT(r, wait) \
- if (((wait) = RING_IS_FULL(r))) { \
+#define SPICE_RING_PROD_WAIT(r, wait) \
+ if (((wait) = SPICE_RING_IS_FULL(r))) { \
(r)->notify_on_cons = (r)->cons + 1; \
spice_mb(); \
- (wait) = RING_IS_FULL(r); \
+ (wait) = SPICE_RING_IS_FULL(r); \
}
-#define RING_PUSH(r, notify) \
+#define SPICE_RING_PUSH(r, notify) \
(r)->prod++; \
spice_mb(); \
(notify) = (r)->prod == (r)->notify_on_prod;
-#define RING_CONS_ITEM(r) (&(r)->items[(r)->cons & RING_INDEX_MASK(r)].el)
+#define SPICE_RING_CONS_ITEM(r) (&(r)->items[(r)->cons & SPICE_RING_INDEX_MASK(r)].el)
-#define RING_CONS_WAIT(r, wait) \
- if (((wait) = RING_IS_EMPTY(r))) { \
+#define SPICE_RING_CONS_WAIT(r, wait) \
+ if (((wait) = SPICE_RING_IS_EMPTY(r))) { \
(r)->notify_on_prod = (r)->prod + 1; \
spice_mb(); \
- (wait) = RING_IS_EMPTY(r); \
+ (wait) = SPICE_RING_IS_EMPTY(r); \
}
-#define RING_POP(r, notify) \
+#define SPICE_RING_POP(r, notify) \
(r)->cons++; \
spice_mb(); \
(notify) = (r)->cons == (r)->notify_on_cons;