Home
last modified time | relevance | path

Searched refs:condition (Results 1 – 25 of 113) sorted by relevance

12345

/base/security/huks/utils/condition/
Dhks_condition.c32 int32_t HksConditionWait(HksCondition *condition) in HksConditionWait() argument
34 HKS_IF_NULL_RETURN(condition, -1) in HksConditionWait()
36 int32_t ret = pthread_mutex_lock(&condition->mutex); in HksConditionWait()
40 if (condition->notified) { in HksConditionWait()
41 condition->notified = false; in HksConditionWait()
42 pthread_mutex_unlock(&condition->mutex); in HksConditionWait()
45 condition->waited = true; in HksConditionWait()
46 ret = pthread_cond_wait(&condition->cond, &condition->mutex); in HksConditionWait()
47 condition->waited = false; in HksConditionWait()
48 condition->notified = false; in HksConditionWait()
[all …]
Dhks_condition.h30 int32_t HksConditionWait(HksCondition *condition);
32 int32_t HksConditionNotify(HksCondition *condition);
34 void HksConditionDestroy(HksCondition* condition);
/base/security/dlp_permission_service/interfaces/inner_api/dlp_fuse/test/unittest/src/
Dfuse_daemon_test.cpp192 DlpCMockCondition condition; variable
193 condition.mockSequence = { true };
194 SetMockConditions("fuse_reply_err", condition);
202 condition.mockSequence = { true };
203 SetMockConditions("fuse_reply_err", condition);
211 condition.mockSequence = { true };
212 SetMockConditions("fuse_reply_entry", condition);
220 condition.mockSequence = { true };
221 SetMockConditions("fuse_reply_entry", condition);
229 condition.mockSequence = { true };
[all …]
/base/security/huks/test/unittest/huks_standard_test/module_test/utils_test/src/
Dhks_condition_test.cpp76 void NotifyCondition(HksCondition *condition) in NotifyCondition() argument
79 (void)condition; in NotifyCondition()
80 int32_t ret = HksConditionNotify(condition); in NotifyCondition()
94 HksCondition *condition = HksConditionCreate(); variable
95 EXPECT_EQ(condition == nullptr, false) << "HksConditionCreate failed";
96 std::thread thObj(NotifyCondition, condition);
97 int32_t ret = HksConditionWait(condition);
99 HksConditionDestroy(condition);
111 HksCondition *condition = HksConditionCreate(); variable
112 condition->notified = true;
[all …]
/base/security/dlp_permission_service/frameworks/test/mock/
Dc_mock_common.cpp27 DlpCMockCondition& condition = g_conditionList[funcName]; in IsFuncNeedMock() local
29 if (condition.mockSequence.size() == 0 || in IsFuncNeedMock()
30 condition.currentTimes > condition.mockSequence.size() - 1) { in IsFuncNeedMock()
31 condition.currentTimes++; in IsFuncNeedMock()
35 bool currentFail = condition.mockSequence[condition.currentTimes]; in IsFuncNeedMock()
36 condition.currentTimes++; in IsFuncNeedMock()
48 void SetMockConditions(const std::string& funcName, DlpCMockCondition& condition) in SetMockConditions() argument
50 condition.currentTimes = 0; in SetMockConditions()
51 g_conditionList[funcName] = condition; in SetMockConditions()
/base/hiviewdfx/hiview/adapter/plugins/eventservice/service/test/unittest/common/
Devent_query_wrapper_builder_test.cpp44 EventStore::Cond condition; variable
47 auto ret = parser.ParseCondition(condListeral, condition);
60 EventStore::Cond condition; variable
62 auto ret = parser.ParseCondition(condListeral, condition);
75 EventStore::Cond condition; variable
78 auto ret = parser.ParseCondition(condListeral, condition);
91 EventStore::Cond condition; variable
94 auto ret = parser.ParseCondition(condListeral, condition);
107 EventStore::Cond condition; variable
110 auto ret = parser.ParseCondition(condListeral, condition);
[all …]
/base/startup/init/services/param/trigger/
Dtrigger_checker.c152 static int CompareValue(const char *condition, const char *value) in CompareValue() argument
154 if (strcmp(condition, "*") == 0) { in CompareValue()
157 if (strcmp(condition, value) == 0) { in CompareValue()
160 char *tmp = strstr(condition, "*"); in CompareValue()
161 if (tmp != NULL && (strncmp(value, condition, tmp - condition) == 0)) { in CompareValue()
167 … int ComputeSubCondition(const LogicCalculator *calculator, LogicData *data, const char *condition) in ComputeSubCondition() argument
174 char *subStr = strstr(condition + data->startIndex, "="); in ComputeSubCondition()
175 if (subStr != NULL && ((uint32_t)(subStr - condition) > data->endIndex)) { in ComputeSubCondition()
176 … if (strncmp(condition + data->startIndex, calculator->triggerContent, triggerContentSize) == 0) { in ComputeSubCondition()
181 int ret = GetValueFromContent(condition + data->startIndex, in ComputeSubCondition()
[all …]
Dtrigger_manager.c71 static int CopyCondition(TriggerNode *node, const char *condition) in CopyCondition() argument
73 if (condition == NULL || strlen(condition) == 0) { in CopyCondition()
78 int ret = ConvertInfixToPrefix(condition, cond, buffSize); in CopyCondition()
80 node->condition = strdup(cond); in CopyCondition()
81 PARAM_CHECK(node->condition != NULL, return -1, "Failed to dup conditition"); in CopyCondition()
86 uint32_t type, const char *condition, uint32_t dataSize) in AddTriggerNode_() argument
90 node->condition = NULL; in AddTriggerNode_()
91 int ret = CopyCondition(node, condition); in AddTriggerNode_()
115 const char *condition, const TriggerExtInfo *extInfo) in AddJobTrigger_() argument
124 …TriggerNode *node = (TriggerNode *)AddTriggerNode_(triggerHead, extInfo->type, condition, triggerN… in AddJobTrigger_()
[all …]
/base/security/asset/test/unittest/inner_api_rust/src/
Dremove.rs35 let mut condition = AssetMap::from([ in remove_condition_exist_and_query() localVariable
40 condition.insert_attr(Tag::Accessibility, Accessibility::DevicePowerOn); in remove_condition_exist_and_query()
41 asset_sdk::Manager::build().unwrap().add(&condition).unwrap(); in remove_condition_exist_and_query()
42 condition.remove(&Tag::Alias); in remove_condition_exist_and_query()
43 condition.remove(&Tag::Secret); in remove_condition_exist_and_query()
44 asset_sdk::Manager::build().unwrap().remove(&condition).unwrap(); in remove_condition_exist_and_query()
45 …expect_error_eq(ErrCode::NotFound, asset_sdk::Manager::build().unwrap().query(&condition).unwrap_e… in remove_condition_exist_and_query()
/base/security/huks/services/huks_standard/huks_service/main/systemapi_wrap/useridm/src/
Dhks_useridm_api_wrap.cpp77 condition(mCondition) {} in GetSecUserInfoCallbackImplHuks()
84 HksCondition *condition; member in GetSecUserInfoCallbackImplHuks
129 HksConditionNotify(condition); in OnSecUserInfo()
136 HksCondition *condition = HksConditionCreate(); in HksUserIdmGetSecInfo()
137 HKS_IF_NULL_LOGE_RETURN(condition, HKS_FAILURE, "create condition failed!") in HksUserIdmGetSecInfo()
139 auto mCallback = std::make_shared<GetSecUserInfoCallbackImplHuks>(outSecInfo, condition); in HksUserIdmGetSecInfo()
146 HksConditionWait(condition); in HksUserIdmGetSecInfo()
152 HksConditionDestroy(condition); in HksUserIdmGetSecInfo()
164 :numOfAuthInfo(mNumOfAuthInfo), condition(mCondition) in GetCredentialInfoCallbackImplHuks()
174 HksCondition *condition; member in GetCredentialInfoCallbackImplHuks
[all …]
/base/hiviewdfx/faultloggerd/common/dfxlog/
Ddfx_log.h80 #define LOG_CHECK_MSG(condition, fmt, ...) \ argument
81 if (__builtin_expect(!(condition), false)) { \
82 …DFXLOG_PRINT(LOG_ERROR, LOG_DOMAIN, LOG_TAG, " check failed: %s" fmt, #condition, ##__VA_ARGS__); \
87 #define LOG_CHECK(condition) LOG_CHECK_MSG(condition, "") argument
91 #define LOG_CHECK_ABORT(condition) \ argument
92 if (__builtin_expect(!(condition), false)) { \
93 LOGF(" check abort: %s", #condition); \
/base/startup/init/test/moduletest/
Dinit_test.cfg4 "condition" : "test.randrom.read.start=1",
11 "condition" : "startup.service.ctl.group-test-stage1=2",
18 "condition" : "startup.service.ctl.group-test-stage2=2",
32 "start-mode" : "condition",
38 "start-mode" : "condition",
44 "start-mode" : "condition",
/base/inputmethod/imf/frameworks/js/napi/inputmethodclient/
Djs_utils.h66 #define PARAM_CHECK_RETURN(env, condition, message, typeCode, retVal) \ argument
68 if (!(condition)) { \
75 #define CHECK_RETURN_VOID(condition, message) \ argument
77 if (!(condition)) { \
78 IMSA_HILOGE("test (" #condition ") failed: " message); \
84 #define CHECK_RETURN(condition, message, retVal) \ argument
86 if (!(condition)) { \
87 IMSA_HILOGE("test (" #condition ") failed: " message); \
/base/time/time_service/framework/js/napi/common/include/
Dnapi_utils.h42 #define CHECK_ARGS_RETURN_VOID(module, context, condition, message, code) \ argument
44 if (!(condition)) { \
48 TIME_HILOGE(module, "test (" #condition ") failed: " message); \
64 #define CHECK_RETURN(module, condition, message, retVal) \ argument
66 if (!(condition)) { \
67 TIME_HILOGE(module, "test (" #condition ") failed: " message); \
72 #define CHECK_RETURN_VOID(module, condition, message) \ argument
74 if (!(condition)) { \
75 TIME_HILOGE(module, "test (" #condition ") failed: " message); \
/base/security/dlp_permission_service/interfaces/inner_api/dlp_parse/test/
Ddlp_crypt_test.cpp336 DlpCMockCondition condition; variable
337 condition.mockSequence = { true };
338 SetMockConditions("EVP_CIPHER_CTX_new", condition);
343 condition.mockSequence = { true };
344 SetMockConditions("EVP_aes_256_ctr", condition);
349 condition.mockSequence = { true };
350 SetMockConditions("EVP_EncryptInit_ex", condition);
355 condition.mockSequence = { false, true };
356 SetMockConditions("EVP_EncryptInit_ex", condition);
361 condition.mockSequence = { true };
[all …]
Ddlp_file_manager_test.cpp149 DlpCMockCondition condition; variable
150 condition.mockSequence = { false, false, true, false, false };
151 SetMockConditions("memcpy_s", condition);
189 DlpCMockCondition condition; variable
190 condition.mockSequence = { true };
191 SetMockConditions("RAND_bytes", condition);
197 condition.mockSequence = { false, true };
198 SetMockConditions("RAND_bytes", condition);
204condition.mockSequence = { false, false, false, false, false, false, false, false, false, false, t…
205 SetMockConditions("memcpy_s", condition);
[all …]
Ddlp_file_test.cpp460 DlpCMockCondition condition; variable
461 condition.mockSequence = { true };
462 SetMockConditions("memcpy_s", condition);
496 DlpCMockCondition condition; variable
497 condition.mockSequence = { false, true };
498 SetMockConditions("memcpy_s", condition);
966 DlpCMockCondition condition; variable
967 condition.mockSequence = { true };
968 SetMockConditions("memcpy_s", condition);
1245 DlpCMockCondition condition; variable
[all …]
/base/security/asset/services/db_operator/src/
Dtable.rs232 pub(crate) fn delete_row(&self, condition: &DbMap) -> Result<i32> { in delete_row()
234 build_sql_where(condition, &mut sql); in delete_row()
237 bind_datas(condition, &stmt, &mut index)?; in delete_row()
253 pub(crate) fn update_row(&self, condition: &DbMap, datas: &DbMap) -> Result<i32> { in update_row()
262 build_sql_where(condition, &mut sql); in update_row()
266 bind_datas(condition, &stmt, &mut index)?; in update_row()
285 condition: &DbMap, in query_row()
296 build_sql_where(condition, &mut sql); in query_row()
300 bind_datas(condition, &stmt, &mut index)?; in query_row()
330 pub(crate) fn count_datas(&self, condition: &DbMap) -> Result<u32> { in count_datas()
[all …]
Ddatabase.rs311 pub fn delete_datas(&mut self, condition: &DbMap) -> Result<i32> { in delete_datas()
313 let closure = |e: &Table| e.delete_row(condition); in delete_datas()
337 pub fn update_datas(&mut self, condition: &DbMap, datas: &DbMap) -> Result<i32> { in update_datas()
339 let closure = |e: &Table| e.update_row(condition, datas); in update_datas()
360 pub fn is_data_exists(&mut self, condition: &DbMap) -> Result<bool> { in is_data_exists()
362 let closure = |e: &Table| e.is_data_exists(condition); in is_data_exists()
387 condition: &DbMap, in query_datas()
391 let closure = |e: &Table| e.query_row(columns, condition, query_options, COLUMN_INFO); in query_datas()
396 pub fn replace_datas(&mut self, condition: &DbMap, datas: &DbMap) -> Result<()> { in replace_datas()
398 let closure = |e: &Table| e.replace_row(condition, datas); in replace_datas()
/base/print/print_fwk/etc/init/
Dcups_service.cfg4 "condition" : "print.cupsd.ready=true",
10 "condition" : "print.cupsd.ready=false",
23 "start-mode" : "condition"
/base/hiviewdfx/hiview/adapter/plugins/eventservice/service/idl/src/
Devent_query_wrapper_builder.cpp51 bool ConditionParser::ParseCondition(const std::string& condStr, EventStore::Cond& condition) in ParseCondition() argument
61 condition = iter->second; in ParseCondition()
88 void ConditionParser::SpliceConditionByLogic(EventStore::Cond& condition, const EventStore::Cond& s… in SpliceConditionByLogic() argument
92 condition.And(subCond); in SpliceConditionByLogic()
97 EventStore::Cond& condition) in ParseLogicCondition() argument
129 condition.And(subCondition); in ParseLogicCondition()
133 bool ConditionParser::ParseAndCondition(const Json::Value& root, EventStore::Cond& condition) in ParseAndCondition() argument
135 return ParseLogicCondition(root, LOGIC_AND_COND, condition); in ParseAndCondition()
138 bool ConditionParser::ParseQueryConditionJson(const Json::Value& root, EventStore::Cond& condition) in ParseQueryConditionJson() argument
145 if (ParseAndCondition(root[condKey], condition)) { in ParseQueryConditionJson()
[all …]
/base/hiviewdfx/hiview/adapter/plugins/eventservice/service/idl/include/
Devent_query_wrapper_builder.h36 bool ParseCondition(const std::string& condStr, EventStore::Cond& condition);
39 void SpliceConditionByLogic(EventStore::Cond& condition, const EventStore::Cond& subCond,
42 …arseLogicCondition(const Json::Value& root, const std::string& logic, EventStore::Cond& condition);
43 bool ParseAndCondition(const Json::Value& root, EventStore::Cond& condition);
44 bool ParseQueryConditionJson(const Json::Value& root, EventStore::Cond& condition);
45 bool ParseQueryCondition(const std::string& condStr, EventStore::Cond& condition);
78 void BuildCondition(const std::string& condition);
/base/update/updater/services/script/script_interpreter/
Dscript_statement.h101 static UScriptStatement* CreateIfStatement(UScriptExpression *condition,
107 UScriptExpression *condition,
111 …static UScriptStatement* CreateWhileStatement(UScriptExpression *condition, UScriptStatementList *…
166 …UScriptForStatement(UScriptExpression *before, UScriptExpression *condition, UScriptExpression *af… in UScriptForStatement() argument
168 condition_(condition), after_(after), statements_(statements) {} in UScriptForStatement()
182 UScriptWhileStatement(UScriptExpression *condition, UScriptStatementList *statements) : in UScriptWhileStatement() argument
183 UScriptStatement(STATEMENT_TYPE_WHILE), condition_(condition), statements_(statements) {} in UScriptWhileStatement()
/base/startup/init/services/param/include/
Dtrigger_checker.h66 int ConvertInfixToPrefix(const char *condition, char *prefix, uint32_t prefixLen);
67 int ComputeCondition(LogicCalculator *calculator, const char *condition);
69 int CheckMatchSubCondition(const char *condition, const char *input, int length);
/base/hiviewdfx/hisysevent/test/moduletest/common/
Dhisysevent_manager_c_test.cpp65 rule.condition = nullptr; in InitQueryRule()
73 (void)StringUtil::CreateCString(&rule.condition, cond); in InitQueryRuleWithCondition()
157 StringUtil::DeletePointer<char>(&rule.condition); in QueryTestWithCondition()
400 std::string cond = R"~({"version":"V1","condition":{"and":[{"param":"NAME","op":"=",
421 …std::string cond = R"~({"version":"V1","condition":{"and":[{"param":"uid_","op":"=","value":1201}]…
441 …std::string cond = R"~({"version":"V1","condition":{"and":[{"param":"pid_","op":">=","value":0}]}}…
461 …std::string cond = R"~({"version":"V1","condition":{"and":[{"param":"type_","op":"<=","value":4}]}…
481 …std::string cond = R"~({"version":"V1","condition":{"and":[{"param":"pid_","op":">","value":0}]}})…
501 …std::string cond = R"~({"version":"V1","condition":{"and":[{"param":"pid_","op":"<","value":0}]}})…
560 std::string cond1 = R"~({"version":"V1","condition":{"and":[{"param":"NAME","op":"=",
[all …]

12345