MCPcopy Create free account
hub / github.com/apache/nuttx / pthread_attr_setschedparam

Function pthread_attr_setschedparam

libs/libc/pthread/pthread_attr_setschedparam.c:55–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 ****************************************************************************/
54
55int pthread_attr_setschedparam(FAR pthread_attr_t *attr,
56 FAR const struct sched_param *param)
57{
58 int ret;
59
60 linfo("attr=%p param=%p\n", attr, param);
61
62 if (!attr || !param)
63 {
64 ret = EINVAL;
65 }
66 else
67 {
68 attr->priority = (short)param->sched_priority;
69#ifdef CONFIG_SCHED_SPORADIC
70 attr->low_priority = (uint8_t)param->sched_ss_low_priority;
71 attr->max_repl = (uint8_t)param->sched_ss_max_repl;
72 attr->repl_period.tv_sec = param->sched_ss_repl_period.tv_sec;
73 attr->repl_period.tv_nsec = param->sched_ss_repl_period.tv_nsec;
74 attr->budget.tv_sec = param->sched_ss_init_budget.tv_sec;
75 attr->budget.tv_nsec = param->sched_ss_init_budget.tv_nsec;
76#endif
77 ret = OK;
78 }
79
80 linfo("Returning %d\n", ret);
81 return ret;
82}

Callers 15

classd_startFunction · 0.85
cxd56_src_initFunction · 0.85
cxd56_init_workerFunction · 0.85
null_startFunction · 0.85
cs4344_startFunction · 0.85
es8311_startFunction · 0.85
cs43l22_startFunction · 0.85
es8388_startFunction · 0.85
wm8994_startFunction · 0.85
wm8904_startFunction · 0.85
vs1053_startFunction · 0.85
wm8776_startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected