I am writing a program that will create two threads, one of them has to have a high pripoity and the other is default. I am using pthread_create() to create the thread and would like to initiate the thread priority from the same command. The way I am doing that is as follow:
pthread_create(&threads[lastThreadIndex], NULL, &solution, (void *)(&threadParam));
where, threads: is an array of type pthread_t that has all my threads in. lastThreadIndex: is a counter solution: is my function threadParam: is a struct that has all variables needed by the solution function.
I have read many articles and most of them suggest to replace NULL with the priority level; However, I never found the level key word or the exact way of doing it.
Please help...
Thanks