return 0;
}
+int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy)
+{
+ if (policy != SCHED_OTHER && policy != SCHED_FIFO && policy != SCHED_RR)
+ return EINVAL;
+ attr->__schedpolicy = policy;
+ return 0;
+}
+
+int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy)
+{
+ *policy = attr->__schedpolicy;
+ return 0;
+}
+
+
/* ---------------------------------------------------
Helper functions for running a thread
and for clearing up afterwards.
void pthread_attr_getdetachstate ( void ) { unimp("pthread_attr_getdetachstate"); }
void pthread_attr_getinheritsched ( void ) { unimp("pthread_attr_getinheritsched"); }
//void pthread_attr_getschedparam ( void ) { unimp("pthread_attr_getschedparam"); }
-void pthread_attr_getschedpolicy ( void ) { unimp("pthread_attr_getschedpolicy"); }
+//void pthread_attr_getschedpolicy ( void ) { unimp("pthread_attr_getschedpolicy"); }
//void pthread_attr_getscope ( void ) { unimp("pthread_attr_getscope"); }
//void pthread_attr_setdetachstate ( void ) { unimp("pthread_attr_setdetachstate"); }
//void pthread_attr_setinheritsched ( void ) { unimp("pthread_attr_setinheritsched"); }
//void pthread_attr_setschedparam ( void ) { unimp("pthread_attr_setschedparam"); }
-void pthread_attr_setschedpolicy ( void ) { unimp("pthread_attr_setschedpolicy"); }
+//void pthread_attr_setschedpolicy ( void ) { unimp("pthread_attr_setschedpolicy"); }
//void pthread_attr_setscope ( void ) { unimp("pthread_attr_setscope"); }
void pthread_barrier_destroy ( void ) { unimp("pthread_barrier_destroy"); }
void pthread_barrier_init ( void ) { unimp("pthread_barrier_init"); }
return 0;
}
+int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy)
+{
+ if (policy != SCHED_OTHER && policy != SCHED_FIFO && policy != SCHED_RR)
+ return EINVAL;
+ attr->__schedpolicy = policy;
+ return 0;
+}
+
+int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy)
+{
+ *policy = attr->__schedpolicy;
+ return 0;
+}
+
+
/* ---------------------------------------------------
Helper functions for running a thread
and for clearing up afterwards.
void pthread_attr_getdetachstate ( void ) { unimp("pthread_attr_getdetachstate"); }
void pthread_attr_getinheritsched ( void ) { unimp("pthread_attr_getinheritsched"); }
//void pthread_attr_getschedparam ( void ) { unimp("pthread_attr_getschedparam"); }
-void pthread_attr_getschedpolicy ( void ) { unimp("pthread_attr_getschedpolicy"); }
+//void pthread_attr_getschedpolicy ( void ) { unimp("pthread_attr_getschedpolicy"); }
//void pthread_attr_getscope ( void ) { unimp("pthread_attr_getscope"); }
//void pthread_attr_setdetachstate ( void ) { unimp("pthread_attr_setdetachstate"); }
//void pthread_attr_setinheritsched ( void ) { unimp("pthread_attr_setinheritsched"); }
//void pthread_attr_setschedparam ( void ) { unimp("pthread_attr_setschedparam"); }
-void pthread_attr_setschedpolicy ( void ) { unimp("pthread_attr_setschedpolicy"); }
+//void pthread_attr_setschedpolicy ( void ) { unimp("pthread_attr_setschedpolicy"); }
//void pthread_attr_setscope ( void ) { unimp("pthread_attr_setscope"); }
void pthread_barrier_destroy ( void ) { unimp("pthread_barrier_destroy"); }
void pthread_barrier_init ( void ) { unimp("pthread_barrier_init"); }
return 0;
}
+int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy)
+{
+ if (policy != SCHED_OTHER && policy != SCHED_FIFO && policy != SCHED_RR)
+ return EINVAL;
+ attr->__schedpolicy = policy;
+ return 0;
+}
+
+int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy)
+{
+ *policy = attr->__schedpolicy;
+ return 0;
+}
+
+
/* ---------------------------------------------------
Helper functions for running a thread
and for clearing up afterwards.
void pthread_attr_getdetachstate ( void ) { unimp("pthread_attr_getdetachstate"); }
void pthread_attr_getinheritsched ( void ) { unimp("pthread_attr_getinheritsched"); }
//void pthread_attr_getschedparam ( void ) { unimp("pthread_attr_getschedparam"); }
-void pthread_attr_getschedpolicy ( void ) { unimp("pthread_attr_getschedpolicy"); }
+//void pthread_attr_getschedpolicy ( void ) { unimp("pthread_attr_getschedpolicy"); }
//void pthread_attr_getscope ( void ) { unimp("pthread_attr_getscope"); }
//void pthread_attr_setdetachstate ( void ) { unimp("pthread_attr_setdetachstate"); }
//void pthread_attr_setinheritsched ( void ) { unimp("pthread_attr_setinheritsched"); }
//void pthread_attr_setschedparam ( void ) { unimp("pthread_attr_setschedparam"); }
-void pthread_attr_setschedpolicy ( void ) { unimp("pthread_attr_setschedpolicy"); }
+//void pthread_attr_setschedpolicy ( void ) { unimp("pthread_attr_setschedpolicy"); }
//void pthread_attr_setscope ( void ) { unimp("pthread_attr_setscope"); }
void pthread_barrier_destroy ( void ) { unimp("pthread_barrier_destroy"); }
void pthread_barrier_init ( void ) { unimp("pthread_barrier_init"); }