]> git.saurik.com Git - apple/xnu.git/blobdiff - tools/tests/xnu_quick_test/atomic_fifo_queue_test.c
xnu-3247.1.106.tar.gz
[apple/xnu.git] / tools / tests / xnu_quick_test / atomic_fifo_queue_test.c
diff --git a/tools/tests/xnu_quick_test/atomic_fifo_queue_test.c b/tools/tests/xnu_quick_test/atomic_fifo_queue_test.c
deleted file mode 100644 (file)
index 06a0e80..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#if defined(i386) || defined(__x86_64__)
-
-#include <libkern/OSAtomic.h>
-#include <stdio.h>
-#include <string.h>
-#include <err.h>
-
-typedef struct {
-       void *next;
-       char *str;
-} QueueNode;
-
-int atomic_fifo_queue_test( void *the_argp ) {
-       OSFifoQueueHead head = OS_ATOMIC_FIFO_QUEUE_INIT;
-       char *str1 = "String 1", *str2 = "String 2";
-       QueueNode node1 = { 0, str1 };
-       OSAtomicFifoEnqueue(&head, &node1, 0);
-       QueueNode node2 = { 0, str2 };
-       OSAtomicFifoEnqueue(&head, &node2, 0);
-       QueueNode *node_ptr = OSAtomicFifoDequeue(&head, 0);
-       if( strcmp(node_ptr->str, str1) != 0 ) {
-               warnx("OSAtomicFifoDequeue returned incorrect string. Expected %s, got %s", str1, node_ptr->str);
-               return 1;
-       }
-       node_ptr = OSAtomicFifoDequeue(&head, 0);
-       if( strcmp(node_ptr->str, str2) != 0 ) {
-               warnx("OSAtomicFifoDequeue returned incorrect string. Expected %s, got %s", str2, node_ptr->str);
-               return 1;
-       }
-       return 0;
-}
-
-#endif