/third_party/libuv/test/ |
H A D | test-thread-priority.c | 52 int policy; in TEST_IMPL() local 67 ASSERT_OK(pthread_getschedparam(task_id, &policy, ¶m)); in TEST_IMPL() 72 min = sched_get_priority_min(policy); in TEST_IMPL() 73 max = sched_get_priority_max(policy); in TEST_IMPL() 88 * test set nice value for the calling thread with default schedule policy in TEST_IMPL()
|
/third_party/toybox/toys/other/ |
H A D | chrt.c | 15 Get/set a process' real-time scheduling policy and priority. 21 Set policy (default -r): 39 #define sched_get_priority_min(policy) \ 40 (int)syscall(SYS_sched_get_priority_min, (int)policy) 41 #define sched_get_priority_max(policy) \ 42 (int)syscall(SYS_sched_get_priority_max, (int)policy) 76 printf("pid %ld's current scheduling policy: %s%s\n", TT.p, s, R); in chrt_main() 88 // Set policy and priority in chrt_main()
|
/foundation/communication/netmanager_ext/services/netfirewallmanager/src/ |
H A D | netfirewall_service.cpp | 89 * @param policy The firewall status to be set 92 int32_t NetFirewallService::SetNetFirewallPolicy(const int32_t userId, const sptr<NetFirewallPolicy> &policy) in SetNetFirewallPolicy() argument 95 policy->isOpen, policy->inAction); in SetNetFirewallPolicy() 100 ret = NetFirewallPolicyManager::GetInstance().SetNetFirewallPolicy(userId, policy); in SetNetFirewallPolicy() 107 if (NetFirewallPolicyManager::GetInstance().IsFirewallStatusChange(policy)) { in SetNetFirewallPolicy() 109 NetFirewallRuleManager::GetInstance().OpenOrCloseNativeFirewall(policy->isOpen); in SetNetFirewallPolicy() 111 if (NetFirewallPolicyManager::GetInstance().IsFirewallActionChange(policy)) { in SetNetFirewallPolicy() 112 NetsysController::GetInstance().SetFirewallDefaultAction(policy->inAction, policy in SetNetFirewallPolicy() 127 GetNetFirewallPolicy(const int32_t userId, sptr<NetFirewallPolicy> &policy) GetNetFirewallPolicy() argument [all...] |
/foundation/filemanagement/storage_service/services/storage_daemon/libfscrypt/src/ |
H A D | fscrypt_control.c | 103 static bool IsSupportedPolicy(const char *policy, in IsSupportedPolicy() argument 106 if ((number >= FSCRYPT_OPTIONS_MAX) || (!policy)) { in IsSupportedPolicy() 112 return IsSupportedPolicyKey(policy, ALL_VERSION, in IsSupportedPolicy() 115 return IsSupportedPolicyKey(policy, FILENAME_MODES, in IsSupportedPolicy() 118 return IsSupportedPolicyKey(policy, CONTENTS_MODES, in IsSupportedPolicy() 126 int FscryptSetSysparam(const char *policy) in FscryptSetSysparam() argument 128 if (!policy) { in FscryptSetSysparam() 132 char *tmp = strdup(policy); in FscryptSetSysparam() 134 LOGE("No memory for policy option"); in FscryptSetSysparam() 149 // check supported policy in FscryptSetSysparam() 194 char policy[POLICY_BUF_SIZE]; InitFscryptPolicy() local [all...] |
/kernel/linux/linux-5.10/security/apparmor/ |
H A D | lib.c | 21 #include "include/policy.h" 35 * Split a namespace name from a profile name (see policy.c for naming 387 state = aa_dfa_next(profile->policy.dfa, in aa_profile_match_label() 388 profile->policy.start[AA_CLASS_LABEL], in aa_profile_match_label() 478 * aa_policy_init - initialize a policy structure 479 * @policy: policy to initialize (NOT NULL) 481 * @name: name of the policy, init will make a copy of it (NOT NULL) 486 * Returns: true if policy init successful 488 bool aa_policy_init(struct aa_policy *policy, cons argument 518 aa_policy_destroy(struct aa_policy *policy) aa_policy_destroy() argument [all...] |
/third_party/musl/porting/liteos_m/user/hook/ |
H A D | los_usr_libc.c | 80 int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) in pthread_attr_setschedpolicy() argument 82 return g_usrLibc->pthread_attr_setschedpolicy(attr, policy); in pthread_attr_setschedpolicy() 85 int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy) in pthread_attr_getschedpolicy() argument 87 return g_usrLibc->pthread_attr_getschedpolicy(attr, policy); in pthread_attr_getschedpolicy() 120 int sched_get_priority_min(int policy) in sched_get_priority_min() argument 122 return g_usrLibc->sched_get_priority_min(policy); in sched_get_priority_min() 125 int sched_get_priority_max(int policy) in sched_get_priority_max() argument 127 return g_usrLibc->sched_get_priority_max(policy); in sched_get_priority_max() 136 int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *param) in pthread_setschedparam() argument 138 return g_usrLibc->pthread_setschedparam(thread, policy, para in pthread_setschedparam() 141 pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param) pthread_getschedparam() argument [all...] |
/third_party/python/Lib/test/test_asyncio/ |
H A D | test_runners.py | 63 policy = TestPolicy(self.new_loop) 64 asyncio.set_event_loop_policy(policy) 67 policy = asyncio.get_event_loop_policy() 68 if policy.loop is not None: 69 self.assertTrue(policy.loop.is_closed()) 70 self.assertTrue(policy.loop.shutdown_ag_run) 208 policy = asyncio.get_event_loop_policy() 209 policy.set_event_loop = mock.Mock() 211 self.assertTrue(policy.set_event_loop.called) 464 policy [all...] |
/kernel/linux/linux-5.10/kernel/sched/ |
H A D | cpufreq.c | 64 * cpufreq_this_cpu_can_update - Check if cpufreq policy can be updated. 65 * @policy: cpufreq policy to check. 68 * - the local and remote CPUs share @policy, 69 * - dvfs_possible_from_any_cpu is set in @policy and the local CPU is not going 72 bool cpufreq_this_cpu_can_update(struct cpufreq_policy *policy) in cpufreq_this_cpu_can_update() argument 74 return cpumask_test_cpu(smp_processor_id(), policy->cpus) || in cpufreq_this_cpu_can_update() 75 (policy->dvfs_possible_from_any_cpu && in cpufreq_this_cpu_can_update()
|
/kernel/linux/linux-6.6/security/apparmor/include/ |
H A D | policy_compat.h | 5 * Code to provide backwards compatibility with older policy versions, 6 * by converting/mapping older policy formats into the newer internal 15 #include "policy.h" 29 int aa_compat_map_xmatch(struct aa_policydb *policy); 30 int aa_compat_map_policy(struct aa_policydb *policy, u32 version); 31 int aa_compat_map_file(struct aa_policydb *policy);
|
/kernel/linux/linux-6.6/kernel/sched/ |
H A D | cpufreq.c | 61 * cpufreq_this_cpu_can_update - Check if cpufreq policy can be updated. 62 * @policy: cpufreq policy to check. 65 * - the local and remote CPUs share @policy, 66 * - dvfs_possible_from_any_cpu is set in @policy and the local CPU is not going 69 bool cpufreq_this_cpu_can_update(struct cpufreq_policy *policy) in cpufreq_this_cpu_can_update() argument 71 return cpumask_test_cpu(smp_processor_id(), policy->cpus) || in cpufreq_this_cpu_can_update() 72 (policy->dvfs_possible_from_any_cpu && in cpufreq_this_cpu_can_update()
|
/third_party/musl/src/thread/ |
H A D | pthread_setschedparam.c | 7 int pthread_setschedparam(pthread_t t, int policy, const struct sched_param *param) in pthread_setschedparam() argument 17 r = !t->tid ? ESRCH : -__syscall(SYS_sched_setscheduler, t->tid, policy, param, MUSL_TYPE_THREAD); in pthread_setschedparam() 19 r = !t->tid ? ESRCH : -__syscall(SYS_sched_setscheduler, t->tid, policy, param); in pthread_setschedparam()
|
H A D | pthread_getschedparam.c | 4 int pthread_getschedparam(pthread_t t, int *restrict policy, struct sched_param *restrict param) in pthread_getschedparam() argument 18 *policy = r; in pthread_getschedparam() 29 *policy = __syscall(SYS_sched_getscheduler, t->tid); in pthread_getschedparam()
|
/third_party/ltp/testcases/kernel/syscalls/sched_get_priority_max/ |
H A D | sched_get_priority_max01.c | 23 #define POLICY_DESC(x) .desc = #x, .policy = x 27 int policy; member 42 TST_EXP_VAL(tst_syscall(__NR_sched_get_priority_max, tc->policy), in run_test()
|
/third_party/ltp/testcases/kernel/syscalls/sched_get_priority_min/ |
H A D | sched_get_priority_min01.c | 23 #define POLICY_DESC(x) .desc = #x, .policy = x 27 int policy; member 42 TST_EXP_VAL(tst_syscall(__NR_sched_get_priority_min, tc->policy), in run_test()
|
/kernel/linux/linux-6.6/mm/ |
H A D | mempolicy.c | 3 * Simple NUMA memory policy for the Linux kernel. 8 * NUMA policy allows the user to give hints in which node(s) memory should 13 * The VMA policy has priority over the process policy for a page fault. 19 * for anonymous memory. For process policy an process counter 32 * process policy. 38 * use the process policy. This is what Linux always did 41 * The process policy is applied for most non interrupt memory allocations 43 * try to allocate on the local CPU. The VMA policy is only applied for memory 46 * Currently there are a few corner cases in swapping where the policy 268 struct mempolicy *policy; mpol_new() local 938 do_get_mempolicy(int *policy, nodemask_t *nmask, unsigned long addr, unsigned long flags) do_get_mempolicy() argument 1705 kernel_get_mempolicy(int __user *policy, unsigned long __user *nmask, unsigned long maxnode, unsigned long addr, unsigned long flags) kernel_get_mempolicy() argument 1839 apply_policy_zone(struct mempolicy *policy, enum zone_type zone) apply_policy_zone() argument 1863 policy_nodemask(gfp_t gfp, struct mempolicy *policy) policy_nodemask() argument 1886 policy_node(gfp_t gfp, struct mempolicy *policy, int nd) policy_node() argument 1908 interleave_nodes(struct mempolicy *policy) interleave_nodes() argument 1925 struct mempolicy *policy; mempolicy_slab_node() local [all...] |
/kernel/linux/linux-5.10/drivers/cpufreq/ |
H A D | longhaul.c | 245 static int longhaul_setstate(struct cpufreq_policy *policy, in longhaul_setstate() argument 619 static int longhaul_target(struct cpufreq_policy *policy, in longhaul_target() argument 628 retval = longhaul_setstate(policy, table_index); in longhaul_target() 643 retval = longhaul_setstate(policy, i); in longhaul_target() 652 retval = longhaul_setstate(policy, table_index); in longhaul_target() 759 static int longhaul_cpu_init(struct cpufreq_policy *policy) in longhaul_cpu_init() argument 896 policy->transition_delay_us = 200000; /* usec */ in longhaul_cpu_init() 897 policy->freq_table = longhaul_table; in longhaul_cpu_init() 955 struct cpufreq_policy *policy = cpufreq_cpu_get(0); in longhaul_exit() local 962 freqs.old = policy in longhaul_exit() [all...] |
/kernel/linux/linux-5.10/lib/ |
H A D | nlattr.c | 50 * policy in some cases, and userspace could try to 57 const struct nla_policy *policy, 86 const struct nla_policy *policy, in nla_validate_array() 100 NL_SET_ERR_MSG_ATTR_POL(extack, entry, policy, in nla_validate_array() 106 maxtype, policy, validate, extack, in nla_validate_array() 359 const struct nla_policy *policy, unsigned int validate, in validate_nla() 362 u16 strict_start_type = policy[0].strict_start_type; in validate_nla() 374 pt = &policy[type]; in validate_nla() 556 "Attribute failed policy validation"); in validate_nla() 561 const struct nla_policy *policy, in __nla_validate_parse() 85 nla_validate_array(const struct nlattr *head, int len, int maxtype, const struct nla_policy *policy, struct netlink_ext_ack *extack, unsigned int validate, unsigned int depth) nla_validate_array() argument 358 validate_nla(const struct nlattr *nla, int maxtype, const struct nla_policy *policy, unsigned int validate, struct netlink_ext_ack *extack, unsigned int depth) validate_nla() argument 560 __nla_validate_parse(const struct nlattr *head, int len, int maxtype, const struct nla_policy *policy, unsigned int validate, struct netlink_ext_ack *extack, struct nlattr **tb, unsigned int depth) __nla_validate_parse() argument 629 __nla_validate(const struct nlattr *head, int len, int maxtype, const struct nla_policy *policy, unsigned int validate, struct netlink_ext_ack *extack) __nla_validate() argument 683 __nla_parse(struct nlattr **tb, int maxtype, const struct nlattr *head, int len, const struct nla_policy *policy, unsigned int validate, struct netlink_ext_ack *extack) __nla_parse() argument [all...] |
/kernel/linux/linux-6.6/drivers/cpufreq/ |
H A D | longhaul.c | 245 static int longhaul_setstate(struct cpufreq_policy *policy, in longhaul_setstate() argument 619 static int longhaul_target(struct cpufreq_policy *policy, in longhaul_target() argument 628 retval = longhaul_setstate(policy, table_index); in longhaul_target() 643 retval = longhaul_setstate(policy, i); in longhaul_target() 652 retval = longhaul_setstate(policy, table_index); in longhaul_target() 759 static int longhaul_cpu_init(struct cpufreq_policy *policy) in longhaul_cpu_init() argument 896 policy->transition_delay_us = 200000; /* usec */ in longhaul_cpu_init() 897 policy->freq_table = longhaul_table; in longhaul_cpu_init() 953 struct cpufreq_policy *policy = cpufreq_cpu_get(0); in longhaul_exit() local 960 freqs.old = policy in longhaul_exit() [all...] |
/kernel/linux/linux-5.10/include/acpi/ |
H A D | processor.h | 313 void acpi_processor_ppc_init(struct cpufreq_policy *policy); 314 void acpi_processor_ppc_exit(struct cpufreq_policy *policy); 322 static inline void acpi_processor_ppc_init(struct cpufreq_policy *policy) in acpi_processor_ppc_init() argument 326 static inline void acpi_processor_ppc_exit(struct cpufreq_policy *policy) in acpi_processor_ppc_exit() argument 442 void acpi_thermal_cpufreq_init(struct cpufreq_policy *policy); 443 void acpi_thermal_cpufreq_exit(struct cpufreq_policy *policy); 445 static inline void acpi_thermal_cpufreq_init(struct cpufreq_policy *policy) in acpi_thermal_cpufreq_init() argument 449 static inline void acpi_thermal_cpufreq_exit(struct cpufreq_policy *policy) in acpi_thermal_cpufreq_exit() argument
|
/kernel/linux/linux-6.6/include/acpi/ |
H A D | processor.h | 318 void acpi_processor_ppc_init(struct cpufreq_policy *policy); 319 void acpi_processor_ppc_exit(struct cpufreq_policy *policy); 327 static inline void acpi_processor_ppc_init(struct cpufreq_policy *policy) in acpi_processor_ppc_init() argument 331 static inline void acpi_processor_ppc_exit(struct cpufreq_policy *policy) in acpi_processor_ppc_exit() argument 450 void acpi_thermal_cpufreq_init(struct cpufreq_policy *policy); 451 void acpi_thermal_cpufreq_exit(struct cpufreq_policy *policy); 453 static inline void acpi_thermal_cpufreq_init(struct cpufreq_policy *policy) in acpi_thermal_cpufreq_init() argument 457 static inline void acpi_thermal_cpufreq_exit(struct cpufreq_policy *policy) in acpi_thermal_cpufreq_exit() argument
|
/kernel/linux/linux-6.6/block/ |
H A D | blk-flush.c | 105 unsigned int policy = 0; in blk_flush_policy() local 108 policy |= REQ_FSEQ_DATA; in blk_flush_policy() 112 policy |= REQ_FSEQ_PREFLUSH; in blk_flush_policy() 115 policy |= REQ_FSEQ_POSTFLUSH; in blk_flush_policy() 117 return policy; in blk_flush_policy() 407 unsigned int policy = blk_flush_policy(fflags, rq); in blk_insert_flush() local 414 * @policy now records what operations need to be done. Adjust in blk_insert_flush() 428 switch (policy) { in blk_insert_flush() 463 blk_flush_complete_seq(rq, fq, REQ_FSEQ_ACTIONS & ~policy, 0); in blk_insert_flush()
|
/third_party/ltp/testcases/kernel/security/tomoyo/ |
H A D | include.h | 273 int write_domain_policy(const char *policy, int is_delete) in write_domain_policy() argument 286 fprintf(domain_fp, "%s\n", policy); in write_domain_policy() 296 if (strcmp(buffer, policy)) in write_domain_policy() 304 policy); in write_domain_policy() 312 int write_exception_policy(const char *policy, int is_delete) in write_exception_policy() argument 324 fprintf(exception_fp, "%s\n", policy); in write_exception_policy() 329 if (strcmp(buffer, policy)) in write_exception_policy() 337 policy); in write_exception_policy()
|
/foundation/systemabilitymgr/samgr_lite/samgr_server/source/ |
H A D | samgr_server_rpc.c | 66 const PolicyTrans *policy, uint32 policyNum); 67 static void TransmitFixedPolicy(IpcIo *reply, PolicyTrans policy); 338 PolicyTrans *policy = NULL; in ProcPutFeature() local 341 int ret = g_server.ipcAuth->GetCommunicationStrategy(regParams, &policy, &policyNum); in ProcPutFeature() 342 if (ret != EC_SUCCESS || policy == NULL) { in ProcPutFeature() 344 SAMGR_Free(policy); in ProcPutFeature() 354 TransmitPolicy(ret, identity, reply, policy, policyNum); in ProcPutFeature() 355 SAMGR_Free(policy); in ProcPutFeature() 360 const PolicyTrans *policy, uint32 policyNum) in TransmitPolicy() 362 if (identity == NULL || reply == NULL || policy in TransmitPolicy() 359 TransmitPolicy(int ret, const SvcIdentity* identity, IpcIo *reply, const PolicyTrans *policy, uint32 policyNum) TransmitPolicy() argument 393 TransmitFixedPolicy(IpcIo *reply, PolicyTrans policy) TransmitFixedPolicy() argument [all...] |
H A D | samgr_server.c | 60 const PolicyTrans *policy, uint32 policyNum);
61 static void TransmitFixedPolicy(IpcIo *reply, PolicyTrans policy);
227 PolicyTrans *policy = NULL;
in ProcPutFeature() local 230 int ret = g_server.ipcAuth->GetCommunicationStrategy(regParams, &policy, &policyNum);
in ProcPutFeature() 231 if (ret != EC_SUCCESS || policy == NULL) {
in ProcPutFeature() 233 SAMGR_Free(policy);
in ProcPutFeature() 244 TransmitPolicy(ret, identity, reply, policy, policyNum);
in ProcPutFeature() 245 SAMGR_Free(policy);
in ProcPutFeature() 250 const PolicyTrans *policy, uint32 policyNum)
in TransmitPolicy() 252 if (identity == NULL || reply == NULL || policy in TransmitPolicy() 249 TransmitPolicy(int ret, const SvcIdentity* identity, IpcIo *reply, const PolicyTrans *policy, uint32 policyNum) TransmitPolicy() argument 283 TransmitFixedPolicy(IpcIo *reply, PolicyTrans policy) TransmitFixedPolicy() argument [all...] |
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedparam/speculative/ |
H A D | 3-2.c | 11 * 2. Set the policy and an invalid priority in that object 32 int policy = RRPOLICY; in main() local 42 rc = pthread_attr_setschedpolicy(&attr, policy); in main() 48 priority = sched_get_priority_max(policy); in main()
|