FS-10167: Retrofit for ks_list to be intrinsicly thread-safe with an internal reader/writer lock

This commit is contained in:
Shane Bryldt committed 2017-04-14 10:56:52 -06:00
1 parent bc456db480
commit f5617f93d2
2 files changed
+162 -56

No files matched your search

+3 -1
View File
@@ -185,6 +185,8 @@ extern "C" {
/** list object */
typedef struct {
ks_pool_t *pool;
ks_rwl_t *lock;
struct ks_list_entry_s *head_sentinel;
struct ks_list_entry_s *tail_sentinel;
struct ks_list_entry_s *mid;
@@ -527,7 +529,7 @@ extern "C" {
* @see ks_list_attributes_comparator()
* @see ks_list_get_at()
*/
KS_DECLARE(int) ks_list_locate(const ks_list_t *restrict l, const void *data);
KS_DECLARE(int) ks_list_locate(const ks_list_t *restrict l, const void *data, ks_bool_t prelocked);
/**
* returns an element given an indicator.