lib/igt_aux: s/swap/igt_swap/

It collides with the subtest naming convention glossary entry for swap.
Which makes the docbook xml stuff unhappy.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2015-02-07 12:37:48 +01:00
parent 3e9b4e37e6
commit 2eca38eab9
7 changed files with 10 additions and 10 deletions

View File

@ -92,7 +92,7 @@ expression E;
- assert(E); - assert(E);
+ igt_assert(E); + igt_assert(E);
// Replace open-coded swap() // Replace open-coded igt_swap()
@@ @@
type T; type T;
T a, b, tmp; T a, b, tmp;
@ -100,7 +100,7 @@ T a, b, tmp;
- tmp = a; - tmp = a;
- a = b; - a = b;
- b = tmp; - b = tmp;
+ swap(a, b); + igt_swap(a, b);
// Replace open-coded min() // Replace open-coded min()
@@ @@

View File

@ -94,7 +94,7 @@ void intel_require_memory(uint32_t count, uint32_t size, unsigned mode);
#define min(a, b) ((a) < (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
#define swap(a, b) do { \ #define igt_swap(a, b) do { \
typeof(a) _tmp = (a); \ typeof(a) _tmp = (a); \
(a) = (b); \ (a) = (b); \
(b) = _tmp; \ (b) = _tmp; \

View File

@ -55,7 +55,7 @@ static void exchange_uint32_t(void *array, unsigned i, unsigned j)
{ {
uint32_t *i_arr = array; uint32_t *i_arr = array;
swap(i_arr[i], i_arr[j]); igt_swap(i_arr[i], i_arr[j]);
} }
static int minor_evictions(int fd, struct igt_eviction_test_ops *ops, static int minor_evictions(int fd, struct igt_eviction_test_ops *ops,

View File

@ -55,13 +55,13 @@ static int ctx_per_thread;
static void xchg_ptr(void *array, unsigned i, unsigned j) static void xchg_ptr(void *array, unsigned i, unsigned j)
{ {
void **A = array; void **A = array;
swap(A[i], A[j]); igt_swap(A[i], A[j]);
} }
static void xchg_int(void *array, unsigned i, unsigned j) static void xchg_int(void *array, unsigned i, unsigned j)
{ {
int *A = array; int *A = array;
swap(A[i], A[j]); igt_swap(A[i], A[j]);
} }
static int reopen(int _fd) static int reopen(int _fd)

View File

@ -172,7 +172,7 @@ static void exchange_uint(void *array, unsigned i, unsigned j)
{ {
unsigned *i_arr = array; unsigned *i_arr = array;
swap(i_arr[i], i_arr[j]); igt_swap(i_arr[i], i_arr[j]);
} }
static void run_sync_test(int num_buffers, bool verify) static void run_sync_test(int num_buffers, bool verify)

View File

@ -571,7 +571,7 @@ static void exchange_uint(void *array, unsigned i, unsigned j)
{ {
unsigned *i_arr = array; unsigned *i_arr = array;
swap(i_arr[i], i_arr[j]); igt_swap(i_arr[i], i_arr[j]);
} }
static void copy_tiles(unsigned *permutation) static void copy_tiles(unsigned *permutation)

View File

@ -242,7 +242,7 @@ static int _emit_dummy_load__bcs(struct test_output *o, int limit, int timeout)
2048, 2048, 2048, 2048,
2048*4, 2048*4); 2048*4, 2048*4);
swap(src_bo, dst_bo); igt_swap(src_bo, dst_bo);
} }
blit_copy(fb_bo, src_bo, blit_copy(fb_bo, src_bo,
min(o->fb_width, 2048), min(o->fb_height, 2048), min(o->fb_width, 2048), min(o->fb_height, 2048),
@ -357,7 +357,7 @@ static int _emit_dummy_load__rcs(struct test_output *o, int limit, int timeout)
2048, 2048, 2048, 2048,
dst, 0, 0); dst, 0, 0);
swap(src, dst); igt_swap(src, dst);
} }
copyfunc(batch, NULL, copyfunc(batch, NULL,
src, 0, 0, src, 0, 0,