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

Function rte_thread_get_priority

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

Source from the content-addressed store, hash-verified

271}
272
273int
274rte_thread_get_priority(rte_thread_t thread_id,
275 enum rte_thread_priority *priority)
276{
277 struct sched_param param;
278 int policy;
279 int ret;
280
281 ret = pthread_getschedparam((pthread_t)thread_id.opaque_id, &policy,
282 &param);
283 if (ret != 0) {
284 RTE_LOG(DEBUG, EAL, "pthread_getschedparam failed\n");
285 goto cleanup;
286 }
287
288 return thread_map_os_priority_to_eal_priority(policy,
289 param.sched_priority, priority);
290
291cleanup:
292 return ret;
293}
294
295int
296rte_thread_set_priority(rte_thread_t thread_id,

Callers 2

test_thread_priorityFunction · 0.50

Tested by 2

test_thread_priorityFunction · 0.40