summaryrefslogtreecommitdiff
path: root/lib/igt_aux.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/igt_aux.c')
-rw-r--r--lib/igt_aux.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 8ca0b60d..a23375a4 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -578,6 +578,22 @@ void igt_exchange_int(void *array, unsigned i, unsigned j)
}
/**
+ * igt_exchange_int64:
+ * @array: pointer to the array of int64_t
+ * @i: first position
+ * @j: second position
+ *
+ * Exchanges the two values at array indices @i and @j. Useful as an exchange
+ * function for igt_permute_array().
+ */
+void igt_exchange_int64(void *array, unsigned i, unsigned j)
+{
+ int64_t *a = array;
+
+ igt_swap(a[i], a[j]);
+}
+
+/**
* igt_permute_array:
* @array: pointer to array
* @size: size of the array