Lines Matching refs:thrd
249 int startThread(Thread * thrd)
255 printf("Start thread priority %d\n", thrd->priority);
256 if (pthread_attr_init(&(thrd->attr)) != 0) {
260 thrd->flags = 0;
262 schedp.sched_priority = thrd->priority;
263 policy = thrd->policy;
265 if (pthread_attr_setschedpolicy(&(thrd->attr), policy) != 0) {
268 if (pthread_attr_getschedpolicy(&(thrd->attr), &policy) != 0) {
273 if (pthread_attr_setschedparam(&(thrd->attr), &schedp) != 0) {
276 if (pthread_attr_getschedparam(&(thrd->attr), &schedp) != 0) {
281 if (pthread_attr_setinheritsched(&(thrd->attr), PTHREAD_EXPLICIT_SCHED)
285 if (pthread_attr_getinheritsched(&(thrd->attr), &inherit) != 0) {
290 if ((retc = pthread_mutex_init(&(thrd->mutex), NULL)) != 0) {
296 if (pthread_cond_init(&(thrd->cond), &condattr) != 0) {
300 pthread_create(&(thrd->pthread), &(thrd->attr), thrd->func, thrd);