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

Function pthread_attr_getschedparam

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

Source from the content-addressed store, hash-verified

53 ****************************************************************************/
54
55int pthread_attr_getschedparam(FAR const pthread_attr_t *attr,
56 FAR 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 param->sched_priority = (int)attr->priority;
69#ifdef CONFIG_SCHED_SPORADIC
70 param->sched_ss_low_priority = (int)attr->low_priority;
71 param->sched_ss_max_repl = (int)attr->max_repl;
72 param->sched_ss_repl_period.tv_sec = attr->repl_period.tv_sec;
73 param->sched_ss_repl_period.tv_nsec = attr->repl_period.tv_nsec;
74 param->sched_ss_init_budget.tv_sec = attr->budget.tv_sec;
75 param->sched_ss_init_budget.tv_nsec = attr->budget.tv_nsec;
76#endif
77 ret = OK;
78 }
79
80 linfo("Returning %d\n", ret);
81 return ret;
82}

Callers 1

work_usrstartFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected