mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Add missing functions
This commit is contained in:
parent
c23041781b
commit
55e3000084
2 changed files with 16 additions and 0 deletions
|
@ -238,6 +238,13 @@ ck_pr_load_8(const uint8_t *target)
|
|||
return result;
|
||||
}
|
||||
|
||||
void ck_pr_store_ptr(void *target, void *value)
|
||||
{
|
||||
pthread_mutex_lock(&glock);
|
||||
*(void **)target = value;
|
||||
pthread_mutex_unlock(&glock);
|
||||
}
|
||||
|
||||
|
||||
// Simple hashset
|
||||
|
||||
|
@ -274,6 +281,14 @@ simple_hashset_t simple_hashset_create()
|
|||
return set;
|
||||
}
|
||||
|
||||
void simple_hashset_destroy(simple_hashset_t set)
|
||||
{
|
||||
if (set) {
|
||||
free(set->items);
|
||||
}
|
||||
free(set);
|
||||
}
|
||||
|
||||
void simple_hashset_set_hash_function(simple_hashset_t set, hash_func_t func)
|
||||
{
|
||||
set->hash_func = func;
|
||||
|
|
|
@ -236,4 +236,5 @@ ck_pr_load_int(const int *target);
|
|||
uint8_t
|
||||
ck_pr_load_8(const uint8_t *target);
|
||||
|
||||
void ck_pr_store_ptr(void *target, void *value);
|
||||
#endif /* CYCLONE_CK_POLYFILL_H */
|
||||
|
|
Loading…
Add table
Reference in a new issue