123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #include "pthread.h"
- #include "implement.h"
- #include "sched.h"
- int
- pthread_getschedparam (pthread_t thread, int *policy,
- struct sched_param *param)
- {
- int result;
-
- result = pthread_kill (thread, 0);
- if (0 != result)
- {
- return result;
- }
-
- if (policy <= (int *) SCHED_MAX || param == NULL)
- {
- return EINVAL;
- }
-
- *policy = SCHED_OTHER;
-
- param->sched_priority = ((pte_thread_t *)thread)->sched_priority;
- return 0;
- }
|