URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 24 |
Rev 157 |
/* Compiler options:
|
/* Compiler options:
|
#cc: additional_flags=-pthread
|
#cc: additional_flags=-pthread
|
#notarget: cris*-*-elf
|
#notarget: cris*-*-elf
|
|
|
A sanity check for syscalls resulting from
|
A sanity check for syscalls resulting from
|
pthread_getschedparam and pthread_setschedparam. */
|
pthread_getschedparam and pthread_setschedparam. */
|
|
|
#include <pthread.h>
|
#include <pthread.h>
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <stdlib.h>
|
#include <stdlib.h>
|
|
|
int main (void)
|
int main (void)
|
{
|
{
|
struct sched_param param;
|
struct sched_param param;
|
int policy;
|
int policy;
|
|
|
if (pthread_getschedparam (pthread_self (), &policy, ¶m) != 0
|
if (pthread_getschedparam (pthread_self (), &policy, ¶m) != 0
|
|| policy != SCHED_OTHER
|
|| policy != SCHED_OTHER
|
|| param.sched_priority != 0)
|
|| param.sched_priority != 0)
|
abort ();
|
abort ();
|
|
|
if (pthread_setschedparam (pthread_self (), SCHED_OTHER, ¶m) != 0
|
if (pthread_setschedparam (pthread_self (), SCHED_OTHER, ¶m) != 0
|
|| param.sched_priority != 0)
|
|| param.sched_priority != 0)
|
abort ();
|
abort ();
|
|
|
printf ("pass\n");
|
printf ("pass\n");
|
exit (0);
|
exit (0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.