Created
August 22, 2016 11:24
-
-
Save anonymous/468565d977b13fb5380680a7ac61470b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pthread_attr_t loThreadAttributes; | |
struct sched_param loThreadSchedulingParameters; | |
pthread_attr_init(&loThreadAttributes); | |
pthread_attr_setschedpolicy(&loThreadAttributes, SCHED_RR); | |
loThreadSchedulingParameters.sched_priority = 1; | |
pthread_attr_setschedparam(&loThreadAttributes, &loThreadSchedulingParameters); | |
bool lbResult = pthread_create(ppnHandle, &loThreadAttributes, pfRoutine, poArguments) == 0; | |
if (lbResult) | |
{ | |
pthread_detach(*ppnHandle); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment