amdgpu: only enable security tests on raven family
[platform/upstream/libdrm.git] / xf86drmSL.c
index bb9ca7f..3826df9 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "libdrm_macros.h"
 #include "xf86drm.h"
 
 #define SL_LIST_MAGIC  0xfacade00LU
 #define SL_ENTRY_MAGIC 0x00fab1edLU
 #define SL_FREED_MAGIC 0xdecea5edLU
 #define SL_MAX_LEVEL   16
-#define SL_DEBUG       0
 #define SL_RANDOM_SEED 0xc01055a1LU
 
 #define SL_RANDOM_DECL        static void *state = NULL
@@ -98,7 +98,7 @@ static int SLRandomLevel(void)
     return level;
 }
 
-void *drmSLCreate(void)
+drm_public void *drmSLCreate(void)
 {
     SkipListPtr  list;
     int          i;
@@ -115,7 +115,7 @@ void *drmSLCreate(void)
     return list;
 }
 
-int drmSLDestroy(void *l)
+drm_public int drmSLDestroy(void *l)
 {
     SkipListPtr   list  = (SkipListPtr)l;
     SLEntryPtr    entry;
@@ -152,7 +152,7 @@ static SLEntryPtr SLLocate(void *l, unsigned long key, SLEntryPtr *update)
     return entry->forward[0];
 }
 
-int drmSLInsert(void *l, unsigned long key, void *value)
+drm_public int drmSLInsert(void *l, unsigned long key, void *value)
 {
     SkipListPtr   list  = (SkipListPtr)l;
     SLEntryPtr    entry;
@@ -185,7 +185,7 @@ int drmSLInsert(void *l, unsigned long key, void *value)
     return 0;                  /* Added to table */
 }
 
-int drmSLDelete(void *l, unsigned long key)
+drm_public int drmSLDelete(void *l, unsigned long key)
 {
     SkipListPtr   list = (SkipListPtr)l;
     SLEntryPtr    update[SL_MAX_LEVEL + 1];
@@ -212,7 +212,7 @@ int drmSLDelete(void *l, unsigned long key)
     return 0;
 }
 
-int drmSLLookup(void *l, unsigned long key, void **value)
+drm_public int drmSLLookup(void *l, unsigned long key, void **value)
 {
     SkipListPtr   list = (SkipListPtr)l;
     SLEntryPtr    update[SL_MAX_LEVEL + 1];
@@ -228,9 +228,9 @@ int drmSLLookup(void *l, unsigned long key, void **value)
     return -1;
 }
 
-int drmSLLookupNeighbors(void *l, unsigned long key,
-                        unsigned long *prev_key, void **prev_value,
-                        unsigned long *next_key, void **next_value)
+drm_public int drmSLLookupNeighbors(void *l, unsigned long key,
+                                    unsigned long *prev_key, void **prev_value,
+                                    unsigned long *next_key, void **next_value)
 {
     SkipListPtr   list = (SkipListPtr)l;
     SLEntryPtr    update[SL_MAX_LEVEL + 1] = {0};
@@ -254,7 +254,7 @@ int drmSLLookupNeighbors(void *l, unsigned long key,
     return retcode;
 }
 
-int drmSLNext(void *l, unsigned long *key, void **value)
+drm_public int drmSLNext(void *l, unsigned long *key, void **value)
 {
     SkipListPtr   list = (SkipListPtr)l;
     SLEntryPtr    entry;
@@ -273,7 +273,7 @@ int drmSLNext(void *l, unsigned long *key, void **value)
     return 0;
 }
 
-int drmSLFirst(void *l, unsigned long *key, void **value)
+drm_public int drmSLFirst(void *l, unsigned long *key, void **value)
 {
     SkipListPtr   list = (SkipListPtr)l;
     
@@ -284,7 +284,7 @@ int drmSLFirst(void *l, unsigned long *key, void **value)
 }
 
 /* Dump internal data structures for debugging. */
-void drmSLDump(void *l)
+drm_public void drmSLDump(void *l)
 {
     SkipListPtr   list = (SkipListPtr)l;
     SLEntryPtr    entry;