Home
last modified time | relevance | path

Searched refs:commitId (Results 1 – 15 of 15) sorted by relevance

/base/startup/init/services/param/include/
Dparam_atomic.h41 #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 …]
Dparam_common.h76 ATOMIC_UINT32 commitId; member
93 ATOMIC_LLONG commitId; member
Dparam_manager.h86 long long commitId; member
/base/startup/init/test/unittest/param/
Datomic_unittest.cpp48 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 …]
Dclient_unittest.cpp95 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/
Dparam_base.h48 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_()
Dparam_trie.c49 ATOMIC_UINT64_INIT(&workSpace->area->commitId, 0); in InitWorkSpace_()
279 ATOMIC_INIT(&node->commitId, 0); in AddParamNode()
Dparam_base.c613 …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/
Dparam_manager.c53 ATOMIC_SYNC_OR_AND_FETCH(&param->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 …]
Dparam_persist.c147 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/
Dsys_param.h55 …long long spaceCommitId = ATOMIC_UINT64_LOAD_EXPLICIT(&param->workspace->area->commitId, MEMORY_OR… in CachedParameterGet()
74 …long long spaceCommitId = ATOMIC_UINT64_LOAD_EXPLICIT(&param->workspace->area->commitId, MEMORY_OR… in CachedParameterGetChanged()
Dinit_param.h179 int SystemGetParameterCommitId(ParamHandle handle, uint32_t *commitId);
/base/startup/init/interfaces/innerkits/syspara/
Dparameter.c48 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/
Dparam_service.c65 …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/
Dparameter_benchmark.cpp322 uint32_t commitId = 0; in BMSystemGetParameterCommitId() local
323 SystemGetParameterCommitId(handle[i], &commitId); in BMSystemGetParameterCommitId()