aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov2015-08-07 10:40:45 -0500
committerEmil Velikov2015-08-13 11:43:19 -0500
commit5f0f6387a6abe9e20c94d99a1e59aa7fa231b17a (patch)
tree93d2541c992f6724b0c1b318d8c94cc12ffe4e72 /amdgpu/util_hash.h
parentbf4826430ab116fad0bded3aef7aa4f0ccc5c548 (diff)
downloadexternal-libdrm-5f0f6387a6abe9e20c94d99a1e59aa7fa231b17a.tar.gz
external-libdrm-5f0f6387a6abe9e20c94d99a1e59aa7fa231b17a.tar.xz
external-libdrm-5f0f6387a6abe9e20c94d99a1e59aa7fa231b17a.zip
amdgpu/util_hash: hide private symbols from global namespace
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'amdgpu/util_hash.h')
-rw-r--r--amdgpu/util_hash.h34
1 files changed, 21 insertions, 13 deletions
diff --git a/amdgpu/util_hash.h b/amdgpu/util_hash.h
index 8e0f9a26..01a4779b 100644
--- a/amdgpu/util_hash.h
+++ b/amdgpu/util_hash.h
@@ -44,8 +44,14 @@
44#ifndef UTIL_HASH_H 44#ifndef UTIL_HASH_H
45#define UTIL_HASH_H 45#define UTIL_HASH_H
46 46
47#ifdef HAVE_CONFIG_H
48#include "config.h"
49#endif
50
47#include <stdbool.h> 51#include <stdbool.h>
48 52
53#include "libdrm_macros.h"
54
49struct util_hash; 55struct util_hash;
50struct util_node; 56struct util_node;
51 57
@@ -55,8 +61,8 @@ struct util_hash_iter {
55}; 61};
56 62
57 63
58struct util_hash *util_hash_create(void); 64drm_private struct util_hash *util_hash_create(void);
59void util_hash_delete(struct util_hash *hash); 65drm_private void util_hash_delete(struct util_hash *hash);
60 66
61 67
62/** 68/**
@@ -65,8 +71,8 @@ void util_hash_delete(struct util_hash *hash);
65 * in the collision list. 71 * in the collision list.
66 * Function returns iterator pointing to the inserted item in the hash. 72 * Function returns iterator pointing to the inserted item in the hash.
67 */ 73 */
68struct util_hash_iter util_hash_insert(struct util_hash *hash, unsigned key, 74drm_private struct util_hash_iter
69 void *data); 75util_hash_insert(struct util_hash *hash, unsigned key, void *data);
70 76
71/** 77/**
72 * Removes the item pointed to by the current iterator from the hash. 78 * Removes the item pointed to by the current iterator from the hash.
@@ -75,25 +81,27 @@ struct util_hash_iter util_hash_insert(struct util_hash *hash, unsigned key,
75 * Function returns iterator pointing to the item after the removed one in 81 * Function returns iterator pointing to the item after the removed one in
76 * the hash. 82 * the hash.
77 */ 83 */
78struct util_hash_iter util_hash_erase(struct util_hash *hash, 84drm_private struct util_hash_iter
79 struct util_hash_iter iter); 85util_hash_erase(struct util_hash *hash, struct util_hash_iter iter);
80 86
81void *util_hash_take(struct util_hash *hash, unsigned key); 87drm_private void *util_hash_take(struct util_hash *hash, unsigned key);
82 88
83 89
84struct util_hash_iter util_hash_first_node(struct util_hash *hash); 90drm_private struct util_hash_iter util_hash_first_node(struct util_hash *hash);
85 91
86/** 92/**
87 * Return an iterator pointing to the first entry in the collision list. 93 * Return an iterator pointing to the first entry in the collision list.
88 */ 94 */
89struct util_hash_iter util_hash_find(struct util_hash *hash, unsigned key); 95drm_private struct util_hash_iter
96util_hash_find(struct util_hash *hash, unsigned key);
90 97
91 98
92int util_hash_iter_is_null(struct util_hash_iter iter); 99drm_private int util_hash_iter_is_null(struct util_hash_iter iter);
93unsigned util_hash_iter_key(struct util_hash_iter iter); 100drm_private unsigned util_hash_iter_key(struct util_hash_iter iter);
94void *util_hash_iter_data(struct util_hash_iter iter); 101drm_private void *util_hash_iter_data(struct util_hash_iter iter);
95 102
96 103
97struct util_hash_iter util_hash_iter_next(struct util_hash_iter iter); 104drm_private struct util_hash_iter
105util_hash_iter_next(struct util_hash_iter iter);
98 106
99#endif 107#endif