mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-05 11:10:21 +00:00
Add pthread_attr_setschedpolicy / pthread_attr_getschedpolicy.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@431
This commit is contained in:
parent
d8cc5306ac
commit
f34cee7b2f
@ -386,6 +386,21 @@ int pthread_attr_getstacksize ( const pthread_attr_t * _attr,
|
||||
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.
|
||||
|
||||
@ -85,13 +85,13 @@ void __libc_current_sigrtmin ( void ) { unimp("__libc_current_sigrtmin"); }
|
||||
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"); }
|
||||
|
||||
@ -386,6 +386,21 @@ int pthread_attr_getstacksize ( const pthread_attr_t * _attr,
|
||||
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.
|
||||
|
||||
@ -85,13 +85,13 @@ void __libc_current_sigrtmin ( void ) { unimp("__libc_current_sigrtmin"); }
|
||||
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"); }
|
||||
|
||||
@ -386,6 +386,21 @@ int pthread_attr_getstacksize ( const pthread_attr_t * _attr,
|
||||
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.
|
||||
|
||||
@ -85,13 +85,13 @@ void __libc_current_sigrtmin ( void ) { unimp("__libc_current_sigrtmin"); }
|
||||
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"); }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user