MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_thread_set_priority

Function rte_thread_set_priority

dpdk/lib/eal/unix/rte_thread.c:295–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295int
296rte_thread_set_priority(rte_thread_t thread_id,
297 enum rte_thread_priority priority)
298{
299 struct sched_param param;
300 int policy;
301 int ret;
302
303 /* Realtime priority can cause crashes on non-Windows platforms. */
304 if (priority == RTE_THREAD_PRIORITY_REALTIME_CRITICAL)
305 return ENOTSUP;
306
307 ret = thread_map_priority_to_os_value(priority, &param.sched_priority,
308 &policy);
309 if (ret != 0)
310 return ret;
311
312 return pthread_setschedparam((pthread_t)thread_id.opaque_id, policy,
313 &param);
314}
315
316int
317rte_thread_key_create(rte_thread_key *key, void (*destructor)(void *))

Callers 1

test_thread_priorityFunction · 0.50

Calls 1

Tested by 1

test_thread_priorityFunction · 0.40