summaryrefslogtreecommitdiff
path: root/xf86drmSL.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2018-09-13 15:42:26 -0700
committerLucas De Marchi <lucas.demarchi@intel.com>2018-09-19 22:46:45 -0700
commit26f9ce50e1353861e4c91f22ade5033072f4058e (patch)
treecc2ef3b19bd77bc23162a1e5db9def3441881922 /xf86drmSL.c
parente15e3a65b80d1da5407bd46b4b0d514e621badd6 (diff)
downloaddrm-26f9ce50e1353861e4c91f22ade5033072f4058e.tar.gz
libdrm: annotate public functions
This was done with: nm --dynamic --defined-only build/libdrm.so | \ grep " T " | \ grep -v _fini | grep -v _init | \ cut -d' ' -f3 > /tmp/a.txt while read sym; do read f func line _ <<<$(cscope -d -L -1 $sym) if [ ! -z "$f" ]; then sed -i "${line}s/^/drm_public /" $f fi done < /tmp/a.txt Then the alignment of function arguments were manually fixed all over. The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Diffstat (limited to 'xf86drmSL.c')
-rw-r--r--xf86drmSL.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/xf86drmSL.c b/xf86drmSL.c
index a12fa1d0..3826df97 100644
--- a/xf86drmSL.c
+++ b/xf86drmSL.c
@@ -41,6 +41,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "libdrm_macros.h"
#include "xf86drm.h"
#define SL_LIST_MAGIC 0xfacade00LU
@@ -97,7 +98,7 @@ static int SLRandomLevel(void)
return level;
}
-void *drmSLCreate(void)
+drm_public void *drmSLCreate(void)
{
SkipListPtr list;
int i;
@@ -114,7 +115,7 @@ void *drmSLCreate(void)
return list;
}
-int drmSLDestroy(void *l)
+drm_public int drmSLDestroy(void *l)
{
SkipListPtr list = (SkipListPtr)l;
SLEntryPtr entry;
@@ -151,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;
@@ -184,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];
@@ -211,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];
@@ -227,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};
@@ -253,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;
@@ -272,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;
@@ -283,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;