• Home
  • Raw
  • Download

Lines Matching refs:entry

74     ParamNode *entry = (ParamNode *)GetTrieNode(workSpace, current->dataIndex);  in ProcessParamTraversal()  local
75 if (entry == NULL) { in ProcessParamTraversal()
78 …if ((strcmp("#", context->prefix) != 0) && (strncmp(entry->data, context->prefix, strlen(context->… in ProcessParamTraversal()
138 ParamNode *entry = (ParamNode *)GetTrieNode(workSpace, current->dataIndex); in DumpTrieDataNodeTraversal() local
139 if (entry != NULL) { in DumpTrieDataNodeTraversal()
141 entry->commitId, entry->keyLength, entry->valueLength, entry->data); in DumpTrieDataNodeTraversal()
400 ParamNode *entry = (ParamNode *)GetTrieNode(workSpace, node->dataIndex); in AddParam() local
401 if (entry == NULL) { in AddParam()
423 ParamNode *entry = (ParamNode *)GetTrieNode(workSpace, *dataIndex); in UpdateParam() local
424 …PARAM_CHECK(entry != NULL, return PARAM_CODE_REACHED_MAX, "Failed to update param value %s %u", na… in UpdateParam()
425 …PARAM_CHECK(entry->keyLength == strlen(name), return PARAM_CODE_INVALID_NAME, "Failed to check nam… in UpdateParam()
428 uint32_t commitId = ATOMIC_LOAD_EXPLICIT(&entry->commitId, MEMORY_ORDER_RELAXED); in UpdateParam()
429 ATOMIC_STORE_EXPLICIT(&entry->commitId, commitId | PARAM_FLAGS_MODIFY, MEMORY_ORDER_RELAXED); in UpdateParam()
430 if (entry->valueLength < PARAM_VALUE_LEN_MAX && valueLen < PARAM_VALUE_LEN_MAX) { in UpdateParam()
431 …int ret = PARAM_MEMCPY(entry->data + entry->keyLength + 1, PARAM_VALUE_LEN_MAX, value, valueLen + … in UpdateParam()
433 entry->valueLength = valueLen; in UpdateParam()
436 ATOMIC_STORE_EXPLICIT(&entry->commitId, (++commitId) | flags, MEMORY_ORDER_RELEASE); in UpdateParam()
445 futex_wake(&entry->commitId, INT_MAX); in UpdateParam()
473 ParamNode *entry = (ParamNode *)GetTrieNode(workSpace, node->dataIndex); in WriteParam() local
474 PARAM_CHECK(entry != NULL, return PARAM_CODE_REACHED_MAX, in WriteParam()
477 ret = CheckParamValue(node, name, value, entry->type); in WriteParam()
586 ParamNode *entry = NULL; in ReadParamName() local
588 entry = (ParamNode *)GetTrieNode(workSpace, index); in ReadParamName()
590 if (entry == NULL) { in ReadParamName()
593 …PARAM_CHECK(length > entry->keyLength, return -1, "Invalid param size %u %u", entry->keyLength, le… in ReadParamName()
594 int ret = PARAM_MEMCPY(name, length, entry->data, entry->keyLength); in ReadParamName()
596 name[entry->keyLength] = '\0'; in ReadParamName()
659 ParamTrieNode *entry = NULL; in CheckParamPermission() local
661 return CheckParamPermission_(&workspace, &entry, srcLabel, name, mode); in CheckParamPermission()
678 STATIC_INLINE int ReadParamValue(ParamNode *entry, char *value, uint32_t *length) in ReadParamValue() argument
680 if (entry == NULL) { in ReadParamValue()
684 *length = entry->valueLength + 1; in ReadParamValue()
687 PARAM_CHECK(*length > entry->valueLength, return PARAM_CODE_INVALID_PARAM, in ReadParamValue()
688 "Invalid value len %u %u", *length, entry->valueLength); in ReadParamValue()
689 uint32_t commitId = ReadCommitId(entry); in ReadParamValue()
690 return ReadParamValue_(entry, &commitId, value, length); in ReadParamValue()
718 ParamTrieNode *entry = NULL; in SystemFindParameter() local
720 int ret = CheckParamPermission_(&workspace, &entry, GetParamSecurityLabel(), name, DAC_READ); in SystemFindParameter()
724 entry = FindTrieNode(workspace, name, strlen(name), NULL); in SystemFindParameter()
726 if (entry != NULL && entry->dataIndex != 0) { in SystemFindParameter()
727 *handle = PARAM_HANDLE(workspace, entry->dataIndex); in SystemFindParameter()
729 } else if (entry != NULL) { in SystemFindParameter()
740 ParamNode *entry = (ParamNode *)GetTrieNodeByHandle(handle); in SystemGetParameterCommitId() local
741 if (entry == NULL) { in SystemGetParameterCommitId()
744 *commitId = ReadCommitId(entry); in SystemGetParameterCommitId()