/base/startup/init/services/param/include/ |
D | param_atomic.h | 41 #define ATOMIC_INIT(commitId, value) *(commitId) = (value) argument 42 #define ATOMIC_LOAD_EXPLICIT(commitId, order) *(commitId) argument 43 #define ATOMIC_STORE_EXPLICIT(commitId, value, order) *(commitId) = (value) argument 44 #define ATOMIC_UINT64_INIT(commitId, value) *(commitId) = (value) argument 45 #define ATOMIC_UINT64_LOAD_EXPLICIT(commitId, order) *(commitId) argument 46 #define ATOMIC_UINT64_STORE_EXPLICIT(commitId, value, order) *(commitId) = (value) argument 47 #define ATOMIC_SYNC_OR_AND_FETCH(commitId, value, order) *(commitId) |= (value) argument 48 #define ATOMIC_SYNC_ADD_AND_FETCH(commitId, value, order) *(commitId) += (value) argument 82 #define ATOMIC_INIT(commitId, value) atomic_init((commitId), (value)) 83 #define ATOMIC_UINT64_INIT(commitId, value) atomic_init((commitId), (value)) [all …]
|
D | param_common.h | 76 ATOMIC_UINT32 commitId; member 93 ATOMIC_LLONG commitId; member
|
D | param_manager.h | 86 long long commitId; member
|
/base/startup/init/test/unittest/param/ |
D | atomic_unittest.cpp | 48 ATOMIC_UINT32 commitId; 57 uint32_t commitId = ATOMIC_LOAD_EXPLICIT(&g_testData.commitId, MEMORY_ORDER_RELAXED); in TestSetData() local 58 … ATOMIC_STORE_EXPLICIT(&g_testData.commitId, commitId | PARAM_FLAGS_MODIFY, MEMORY_ORDER_RELAXED); in TestSetData() 61 …printf("TestSetData data: %d commit: %d \n", g_testData.data, g_testData.commitId & PARAM_FLAGS_CO… in TestSetData() 62 uint32_t flags = commitId & ~PARAM_FLAGS_COMMITID; in TestSetData() 63 ATOMIC_STORE_EXPLICIT(&g_testData.commitId, (++commitId) | flags, MEMORY_ORDER_RELEASE); in TestSetData() 64 futex_wake(&g_testData.commitId, INT_MAX); in TestSetData() 72 uint32_t commitId = ATOMIC_LOAD_EXPLICIT(&entry->commitId, MEMORY_ORDER_ACQUIRE); in TestReadCommitId() local 73 while (commitId & PARAM_FLAGS_MODIFY) { in TestReadCommitId() 74 futex_wait(&entry->commitId, commitId); in TestReadCommitId() [all …]
|
D | client_unittest.cpp | 95 uint32_t commitId = 0; in TestParamTraversal() local 96 int ret = SystemGetParameterCommitId(handle, &commitId); in TestParamTraversal() 157 uint32_t commitId = 0; in TestClientApi() local 158 ret = SystemGetParameterCommitId(handle, &commitId); in TestClientApi()
|
/base/startup/init/services/param/base/ |
D | param_base.h | 48 uint32_t commitId = ATOMIC_LOAD_EXPLICIT(&entry->commitId, MEMORY_ORDER_ACQUIRE); in ReadCommitId() local 49 while (commitId & PARAM_FLAGS_MODIFY) { in ReadCommitId() 50 futex_wait(&entry->commitId, commitId); in ReadCommitId() 51 commitId = ATOMIC_LOAD_EXPLICIT(&entry->commitId, MEMORY_ORDER_ACQUIRE); in ReadCommitId() 53 return commitId & PARAM_FLAGS_COMMITID; in ReadCommitId() 56 static inline int ReadParamValue_(ParamNode *entry, uint32_t *commitId, char *value, uint32_t *leng… in ReadParamValue_() argument 58 uint32_t id = *commitId; in ReadParamValue_() 60 *commitId = id; in ReadParamValue_() 66 } while (*commitId != id); // if change,must read in ReadParamValue_()
|
D | param_trie.c | 49 ATOMIC_UINT64_INIT(&workSpace->area->commitId, 0); in InitWorkSpace_() 279 ATOMIC_INIT(&node->commitId, 0); in AddParamNode()
|
D | param_base.c | 613 …param->spaceCommitId = ATOMIC_UINT64_LOAD_EXPLICIT(&workspace->area->commitId, MEMORY_ORDER_ACQUIR… in CachedParameterCreate() 631 uint32_t dataCommitId = ATOMIC_LOAD_EXPLICIT(&entry->commitId, MEMORY_ORDER_ACQUIRE); in CachedParameterCheck()
|
/base/startup/init/services/param/manager/ |
D | param_manager.c | 53 ATOMIC_SYNC_OR_AND_FETCH(¶m->commitId, PARAM_FLAGS_WAITED, MEMORY_ORDER_RELEASE); in SystemCheckMatchParamWait() 141 entry->commitId, entry->keyLength, entry->valueLength, entry->data); in DumpTrieDataNodeTraversal() 165 PARAM_DUMP(" commitId : %" PRId64 "\n", workSpace->area->commitId); in HashNodeTraverseForDump() 406 ATOMIC_SYNC_ADD_AND_FETCH(&workSpace->area->commitId, 1, MEMORY_ORDER_RELEASE); in AddParam() 410 ATOMIC_SYNC_ADD_AND_FETCH(&space->area->commitId, 1, MEMORY_ORDER_RELEASE); in AddParam() 428 uint32_t commitId = ATOMIC_LOAD_EXPLICIT(&entry->commitId, MEMORY_ORDER_RELAXED); in UpdateParam() local 429 ATOMIC_STORE_EXPLICIT(&entry->commitId, commitId | PARAM_FLAGS_MODIFY, MEMORY_ORDER_RELAXED); in UpdateParam() 435 uint32_t flags = commitId & ~PARAM_FLAGS_COMMITID; in UpdateParam() 436 ATOMIC_STORE_EXPLICIT(&entry->commitId, (++commitId) | flags, MEMORY_ORDER_RELEASE); in UpdateParam() 437 ATOMIC_SYNC_ADD_AND_FETCH(&workSpace->area->commitId, 1, MEMORY_ORDER_RELEASE); in UpdateParam() [all …]
|
D | param_persist.c | 147 PARAM_LOGV("CheckAndSavePersistParam commit %lld %lld", commit, g_persistWorkSpace.commitId); in CheckAndSavePersistParam() 148 if (g_persistWorkSpace.commitId == commit) { in CheckAndSavePersistParam() 151 g_persistWorkSpace.commitId = commit; in CheckAndSavePersistParam()
|
/base/startup/init/services/include/param/ |
D | sys_param.h | 55 …long long spaceCommitId = ATOMIC_UINT64_LOAD_EXPLICIT(¶m->workspace->area->commitId, MEMORY_OR… in CachedParameterGet() 74 …long long spaceCommitId = ATOMIC_UINT64_LOAD_EXPLICIT(¶m->workspace->area->commitId, MEMORY_OR… in CachedParameterGetChanged()
|
D | init_param.h | 179 int SystemGetParameterCommitId(ParamHandle handle, uint32_t *commitId);
|
/base/startup/init/interfaces/innerkits/syspara/ |
D | parameter.c | 48 uint32_t commitId = 0; in GetParameterCommitId() local 49 int ret = SystemGetParameterCommitId(handle, &commitId); in GetParameterCommitId() 51 return commitId; in GetParameterCommitId()
|
/base/startup/init/services/param/linux/ |
D | param_service.c | 65 …if ((ATOMIC_LOAD_EXPLICIT(&entry->commitId, MEMORY_ORDER_RELAXED) & PARAM_FLAGS_TRIGGED) != PARAM_… in CheckAndSendTrigger() 69 ATOMIC_SYNC_OR_AND_FETCH(&entry->commitId, PARAM_FLAGS_TRIGGED, MEMORY_ORDER_RELEASE); in CheckAndSendTrigger() 75 …if ((ATOMIC_LOAD_EXPLICIT(&entry->commitId, MEMORY_ORDER_RELAXED) & PARAM_FLAGS_WAITED) != PARAM_F… in CheckAndSendTrigger() 79 ATOMIC_SYNC_OR_AND_FETCH(&entry->commitId, PARAM_FLAGS_WAITED, MEMORY_ORDER_RELEASE); in CheckAndSendTrigger()
|
/base/startup/init/test/benchmark/ |
D | parameter_benchmark.cpp | 322 uint32_t commitId = 0; in BMSystemGetParameterCommitId() local 323 SystemGetParameterCommitId(handle[i], &commitId); in BMSystemGetParameterCommitId()
|