Lines Matching defs:commitId
48 ATOMIC_UINT32 commitId;
57 uint32_t commitId = ATOMIC_LOAD_EXPLICIT(&g_testData.commitId, MEMORY_ORDER_RELAXED);
58 ATOMIC_STORE_EXPLICIT(&g_testData.commitId, commitId | PARAM_FLAGS_MODIFY, MEMORY_ORDER_RELAXED);
61 printf("TestSetData data: %d commit: %d \n", g_testData.data, g_testData.commitId & PARAM_FLAGS_COMMITID);
62 uint32_t flags = commitId & ~PARAM_FLAGS_COMMITID;
63 ATOMIC_STORE_EXPLICIT(&g_testData.commitId, (++commitId) | flags, MEMORY_ORDER_RELEASE);
64 futex_wake(&g_testData.commitId, INT_MAX);
72 uint32_t commitId = ATOMIC_LOAD_EXPLICIT(&entry->commitId, MEMORY_ORDER_ACQUIRE);
73 while (commitId & PARAM_FLAGS_MODIFY) {
74 futex_wait(&entry->commitId, commitId);
75 commitId = ATOMIC_LOAD_EXPLICIT(&entry->commitId, MEMORY_ORDER_ACQUIRE);
77 return commitId & PARAM_FLAGS_COMMITID;
80 static inline int TestReadParamValue(AtomicTestData *entry, uint32_t *commitId)
83 uint32_t id = *commitId;
85 *commitId = id;
88 } while (*commitId != id); // if change, must read
96 uint32_t commitId = TestReadCommitId(&g_testData);
97 data = TestReadParamValue(&g_testData, &commitId);
98 printf("[ %d] TestReadData data: %d commit: %d \n", gettid(), data, commitId);