summaryrefslogtreecommitdiff
path: root/lang/gcc34/files/dummy_pthreads.c
blob: 73a1608b3eb27d619440720aaab62aec22491099 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <pthread.h> 
#include <errno.h>

/*  These are some dummy replacements for functions missing in the pthread library */

int pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, int protocol) {
	return 0;
}

int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *attr, int *prioceiling) {
	return 0;
}

int
pthread_setschedparam(pthread_t thread, int policy,
    const struct sched_param *param)
{
        if (param == NULL || policy < SCHED_FIFO || policy > SCHED_RR)
                return EINVAL;
        if (param->sched_priority > 0 || policy != SCHED_RR)
                return ENOTSUP;
        return 0;
}

 
int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr,
    int prioceiling)
{
	return 0;
}