Printing the default thread's priority
问题 I'd like to write a code which prints the default thread's priority, but I don't know if this is possible. So far I created a thread with default attributes, but I didn't find any statement which allows me to store and print its default priority. // main.c #include <stdlib.h> #include <stdio.h> #include <pthread.h> #include <sched.h> #include "task.h" int main() { pthread_attr_t attr; struct sched_param prio; pthread_t tid; int create = 1; // default attributes pthread_attr_init(&attr);