diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2015-08-07 16:44:33 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2015-08-13 17:43:22 +0100 |
commit | f4d14f147cfc2bdea4f1ffafcfd302ebdfbcef1d (patch) | |
tree | d37c2fafea15e3473b94e50ac827477e0eb5ef6c /amdgpu | |
parent | 5f0f6387a6abe9e20c94d99a1e59aa7fa231b17a (diff) | |
download | libdrm-f4d14f147cfc2bdea4f1ffafcfd302ebdfbcef1d.tar.gz libdrm-f4d14f147cfc2bdea4f1ffafcfd302ebdfbcef1d.tar.bz2 libdrm-f4d14f147cfc2bdea4f1ffafcfd302ebdfbcef1d.zip |
amdgpu/util_hash_table: 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')
-rw-r--r-- | amdgpu/util_hash_table.c | 18 | ||||
-rw-r--r-- | amdgpu/util_hash_table.h | 24 |
2 files changed, 26 insertions, 16 deletions
diff --git a/amdgpu/util_hash_table.c b/amdgpu/util_hash_table.c index cb7213c3..ce6f1d59 100644 --- a/amdgpu/util_hash_table.c +++ b/amdgpu/util_hash_table.c @@ -69,8 +69,9 @@ util_hash_table_item(struct util_hash_iter iter) return (struct util_hash_table_item *)util_hash_iter_data(iter); } -struct util_hash_table *util_hash_table_create(unsigned (*hash)(void *key), - int (*compare)(void *key1, void *key2)) +drm_private struct util_hash_table * +util_hash_table_create(unsigned (*hash)(void *key), + int (*compare)(void *key1, void *key2)) { struct util_hash_table *ht; @@ -126,7 +127,8 @@ util_hash_table_find_item(struct util_hash_table *ht, return NULL; } -void util_hash_table_set(struct util_hash_table *ht, void *key, void *value) +drm_private void +util_hash_table_set(struct util_hash_table *ht, void *key, void *value) { unsigned key_hash; struct util_hash_table_item *item; @@ -159,7 +161,7 @@ void util_hash_table_set(struct util_hash_table *ht, void *key, void *value) } } -void *util_hash_table_get(struct util_hash_table *ht, void *key) +drm_private void *util_hash_table_get(struct util_hash_table *ht, void *key) { unsigned key_hash; struct util_hash_table_item *item; @@ -177,7 +179,7 @@ void *util_hash_table_get(struct util_hash_table *ht, void *key) return item->value; } -void util_hash_table_remove(struct util_hash_table *ht, void *key) +drm_private void util_hash_table_remove(struct util_hash_table *ht, void *key) { unsigned key_hash; struct util_hash_iter iter; @@ -200,7 +202,7 @@ void util_hash_table_remove(struct util_hash_table *ht, void *key) util_hash_erase(ht->head, iter); } -void util_hash_table_clear(struct util_hash_table *ht) +drm_private void util_hash_table_clear(struct util_hash_table *ht) { struct util_hash_iter iter; struct util_hash_table_item *item; @@ -217,7 +219,7 @@ void util_hash_table_clear(struct util_hash_table *ht) } } -void util_hash_table_foreach(struct util_hash_table *ht, +drm_private void util_hash_table_foreach(struct util_hash_table *ht, void (*callback)(void *key, void *value, void *data), void *data) { @@ -236,7 +238,7 @@ void util_hash_table_foreach(struct util_hash_table *ht, } } -void util_hash_table_destroy(struct util_hash_table *ht) +drm_private void util_hash_table_destroy(struct util_hash_table *ht) { struct util_hash_iter iter; struct util_hash_table_item *item; diff --git a/amdgpu/util_hash_table.h b/amdgpu/util_hash_table.h index 04fe7043..e0001289 100644 --- a/amdgpu/util_hash_table.h +++ b/amdgpu/util_hash_table.h @@ -34,6 +34,12 @@ #ifndef U_HASH_TABLE_H_ #define U_HASH_TABLE_H_ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "libdrm_macros.h" + /** * Generic purpose hash table. */ @@ -45,21 +51,23 @@ struct util_hash_table; * @param hash hash function * @param compare should return 0 for two equal keys. */ -struct util_hash_table *util_hash_table_create(unsigned (*hash)(void *key), - int (*compare)(void *key1, void *key2)); +drm_private struct util_hash_table * +util_hash_table_create(unsigned (*hash)(void *key), + int (*compare)(void *key1, void *key2)); -void util_hash_table_set(struct util_hash_table *ht, void *key, void *value); +drm_private void +util_hash_table_set(struct util_hash_table *ht, void *key, void *value); -void *util_hash_table_get(struct util_hash_table *ht, void *key); +drm_private void *util_hash_table_get(struct util_hash_table *ht, void *key); -void util_hash_table_remove(struct util_hash_table *ht, void *key); +drm_private void util_hash_table_remove(struct util_hash_table *ht, void *key); -void util_hash_table_clear(struct util_hash_table *ht); +drm_private void util_hash_table_clear(struct util_hash_table *ht); -void util_hash_table_foreach(struct util_hash_table *ht, +drm_private void util_hash_table_foreach(struct util_hash_table *ht, void (*callback)(void *key, void *value, void *data), void *data); -void util_hash_table_destroy(struct util_hash_table *ht); +drm_private void util_hash_table_destroy(struct util_hash_table *ht); #endif /* U_HASH_TABLE_H_ */ |