Lines Matching refs:entry

74     ParamNode *entry = (ParamNode *)GetTrieNode(workSpace, current->dataIndex);

75 if (entry == NULL) {
78 if ((strcmp("#", context->prefix) != 0) && (strncmp(entry->data, context->prefix, strlen(context->prefix)) != 0)) {
137 ParamNode *entry = (ParamNode *)GetTrieNode(workSpace, current->dataIndex);
138 if (entry != NULL) {
140 entry->commitId, entry->keyLength, entry->valueLength, entry->data);
428 ParamNode *entry = (ParamNode *)GetTrieNode(workSpace, node->dataIndex);
429 if (entry == NULL) {
452 ParamNode *entry = (ParamNode *)GetTrieNode(workSpace, *dataIndex);
453 PARAM_CHECK(entry != NULL, return PARAM_CODE_REACHED_MAX, "Failed to update param value %s %u", name, *dataIndex);
454 PARAM_CHECK(entry->keyLength == strlen(name), return PARAM_CODE_INVALID_NAME, "Failed to check name len %s", name);
457 uint32_t commitId = ATOMIC_LOAD_EXPLICIT(&entry->commitId, MEMORY_ORDER_RELAXED);
458 ATOMIC_STORE_EXPLICIT(&entry->commitId, commitId | PARAM_FLAGS_MODIFY, MEMORY_ORDER_RELAXED);
459 if (entry->valueLength < PARAM_VALUE_LEN_MAX && valueLen < PARAM_VALUE_LEN_MAX) {
460 int ret = PARAM_MEMCPY(entry->data + entry->keyLength + 1, PARAM_VALUE_LEN_MAX, value, valueLen + 1);
462 entry->valueLength = valueLen;
467 ATOMIC_STORE_EXPLICIT(&entry->commitId, flags | commitIdCount, MEMORY_ORDER_RELEASE);
478 entry->commitId |= PARAM_FLAGS_PERSIST;
480 futex_wake(&entry->commitId, INT_MAX);
508 ParamNode *entry = (ParamNode *)GetTrieNode(workSpace, node->dataIndex);
509 PARAM_CHECK(entry != NULL, return PARAM_CODE_REACHED_MAX,
512 ret = CheckParamValue(node, name, value, entry->type);
622 ParamNode *entry = NULL;
624 entry = (ParamNode *)GetTrieNode(workSpace, index);
626 if (entry == NULL) {
629 PARAM_CHECK(length > entry->keyLength, return -1, "Invalid param size %u %u", entry->keyLength, length);
630 int ret = PARAM_MEMCPY(name, length, entry->data, entry->keyLength);
632 name[entry->keyLength] = '\0';
695 ParamTrieNode *entry = NULL;
697 return CheckParamPermission_(&workspace, &entry, srcLabel, name, mode);
714 STATIC_INLINE int ReadParamValue(ParamNode *entry, char *value, uint32_t *length)
716 if (entry == NULL) {
720 *length = entry->valueLength + 1;
723 PARAM_CHECK(*length > entry->valueLength, return PARAM_CODE_INVALID_VALUE,
724 "Invalid value len %u %u", *length, entry->valueLength);
725 uint32_t commitId = ReadCommitId(entry);
726 return ReadParamValue_(entry, &commitId, value, length);
761 ParamTrieNode *entry = NULL;
763 int ret = CheckParamPermission_(&workspace, &entry, GetParamSecurityLabel(), name, DAC_READ);
767 entry = FindTrieNode(workspace, name, strlen(name), NULL);
769 if (entry != NULL && entry->dataIndex != 0) {
770 *handle = PARAM_HANDLE(workspace, entry->dataIndex);
772 } else if (entry != NULL) {
783 ParamNode *entry = (ParamNode *)GetTrieNodeByHandle(handle);
784 if (entry == NULL) {
787 *commitId = ReadCommitId(entry);