|
Scrambler
1
|
Wrapper file for pthreads. More...
Go to the source code of this file.
Functions/Subroutines | |
| void | fpthread_create_ (pthread_t *thread, pthread_attr_t *attr, void(*start_routine)(void *), void *data, int *ierr) |
| void | fpthread_create_noattr_ (pthread_t *thread, void(*start_routine)(void *), void *data, int *ierr) |
| void | fpthread_join_ (pthread_t *thread, void **status, int *ierr) |
| void | fpthread_cancel_ (pthread_t *thread, int *ierr) |
| void | fpthread_detach_ (pthread_t *thread, int *ierr) |
| void | fpthread_exit_ (void *data) |
| void | fpthread_setschedprio_ (pthread_t *thread, int *prio, int *ierr) |
| void | fpthread_getschedparam_ (pthread_t *thread, int *policy, int *priority, int *ierr) |
| void | fpthread_setschedparam_ (pthread_t *thread, int *policy, int *priority, int *ierr) |
| void | fpthread_equal_ (pthread_t *p1, pthread_t *p2, int *iequal, int *ierr) |
| void | fpthread_self_ (pthread_t *pout, int *ierr) |
| void | get_errno_ (int *e) |
| void | fpthread_mutex_init_ (pthread_mutex_t *mutex, pthread_mutexattr_t *attr, int *ierr) |
| void | fpthread_mutex_lock_ (pthread_mutex_t *mutex, int *ierr) |
| void | fpthread_mutex_trylock_ (pthread_mutex_t *mutex, int *ierr) |
| void | fpthread_mutex_unlock_ (pthread_mutex_t *mutex, int *ierr) |
| void | fpthread_mutex_destroy_ (pthread_mutex_t *mutex, int *ierr) |
| void | fpthread_cond_init_ (pthread_cond_t *cond, pthread_condattr_t *attr, int *ierr) |
| void | fpthread_cond_signal_ (pthread_cond_t *cond, int *ierr) |
| void | fpthread_cond_broadcast_ (pthread_cond_t *cond, int *ierr) |
| void | fpthread_cond_wait_ (pthread_cond_t *cond, pthread_mutex_t *mutex, int *ierr) |
| void | fpthread_cond_destroy_ (pthread_cond_t *cond, int *ierr) |
| void | fpthread_attr_destroy_ (pthread_attr_t *attr, int *ierr) |
| void | fpthread_attr_init_ (pthread_attr_t *attr, int *ierr) |
| void | fpthread_attr_getdetachstate_ (pthread_attr_t *attr, int *detachstate, int *ierr) |
| void | fpthread_attr_setdetachstate_ (pthread_attr_t *attr, int *detachstate, int *ierr) |
| void | fpthread_attr_getstacksize_ (pthread_attr_t *attr, size_t *stacksize, int *ierr) |
| void | fpthread_attr_setstacksize_ (pthread_attr_t *attr, size_t *stacksize, int *ierr) |
| void | fpthread_attr_getstack_ (pthread_attr_t *attr, size_t *stackaddr, size_t *stacksize, int *ierr) |
| void | fpthread_attr_getscope_ (pthread_attr_t *attr, int *scope, int *ierr) |
| void | fpthread_attr_setscope_ (pthread_attr_t *attr, int *scope, int *ierr) |
| void | fpthread_attr_getschedpolicy_ (pthread_attr_t *attr, int *schedpolicy, int *ierr) |
| void | fpthread_attr_setschedpolicy_ (pthread_attr_t *attr, int *schedpolicy, int *ierr) |
| void | fpthread_attr_getschedparam_ (pthread_attr_t *attr, struct sched_param *schedparam, int *ierr) |
| void | fpthread_attr_setschedparam_ (pthread_attr_t *attr, struct sched_param *schedparam, int *ierr) |
Wrapper file for pthreads.
Definition in file fpthread_lib.c.
| void fpthread_create_ | ( | pthread_t * | thread, |
| pthread_attr_t * | attr, | ||
| void(*)(void *) | start_routine, | ||
| void * | data, | ||
| int * | ierr | ||
| ) |
Thread creation and destruction
Definition at line 38 of file fpthread_lib.c.
{
*ierr = pthread_create(thread,attr, (void*)start_routine,data);
return;
}
| void fpthread_create_noattr_ | ( | pthread_t * | thread, |
| void(*)(void *) | start_routine, | ||
| void * | data, | ||
| int * | ierr | ||
| ) |
Definition at line 45 of file fpthread_lib.c.
{
*ierr = pthread_create(thread,NULL,(void*)start_routine,data);
return;
}
| void fpthread_join_ | ( | pthread_t * | thread, |
| void ** | status, | ||
| int * | ierr | ||
| ) |
Definition at line 51 of file fpthread_lib.c.
{
*ierr = pthread_join(*thread,(void**) status);
return;
}
| void fpthread_cancel_ | ( | pthread_t * | thread, |
| int * | ierr | ||
| ) |
Definition at line 57 of file fpthread_lib.c.
{
*ierr = pthread_cancel(*thread);
return;
}
| void fpthread_detach_ | ( | pthread_t * | thread, |
| int * | ierr | ||
| ) |
Definition at line 63 of file fpthread_lib.c.
{
*ierr = pthread_detach(*thread);
}
| void fpthread_exit_ | ( | void * | data | ) |
Definition at line 68 of file fpthread_lib.c.
{
pthread_exit((void *)data);
}
| void fpthread_setschedprio_ | ( | pthread_t * | thread, |
| int * | prio, | ||
| int * | ierr | ||
| ) |
Definition at line 73 of file fpthread_lib.c.
{
*ierr= pthread_setschedprio(*thread, *prio);
}
| void fpthread_getschedparam_ | ( | pthread_t * | thread, |
| int * | policy, | ||
| int * | priority, | ||
| int * | ierr | ||
| ) |
Definition at line 78 of file fpthread_lib.c.
{
struct sched_param param;
*ierr=pthread_getschedparam(*thread, policy, ¶m);
*priority=param.sched_priority;
}
| void fpthread_setschedparam_ | ( | pthread_t * | thread, |
| int * | policy, | ||
| int * | priority, | ||
| int * | ierr | ||
| ) |
Definition at line 86 of file fpthread_lib.c.
{
struct sched_param param;
param.sched_priority=*priority;
*ierr=pthread_setschedparam(*thread, *policy, ¶m);
}
| void fpthread_equal_ | ( | pthread_t * | p1, |
| pthread_t * | p2, | ||
| int * | iequal, | ||
| int * | ierr | ||
| ) |
bookkeeping support
Definition at line 95 of file fpthread_lib.c.
{
*iequal=pthread_equal(*p1,*p2);
*ierr = 0;
}
| void fpthread_self_ | ( | pthread_t * | pout, |
| int * | ierr | ||
| ) |
Definition at line 101 of file fpthread_lib.c.
{
*pout = pthread_self();
*ierr = 0;
}
| void get_errno_ | ( | int * | e | ) |
Definition at line 107 of file fpthread_lib.c.
{
*e = errno;
}
| void fpthread_mutex_init_ | ( | pthread_mutex_t * | mutex, |
| pthread_mutexattr_t * | attr, | ||
| int * | ierr | ||
| ) |
MUTEX support
Definition at line 116 of file fpthread_lib.c.
{
*ierr = pthread_mutex_init(mutex,attr);
return;
}
| void fpthread_mutex_lock_ | ( | pthread_mutex_t * | mutex, |
| int * | ierr | ||
| ) |
Definition at line 122 of file fpthread_lib.c.
{
*ierr = pthread_mutex_lock(mutex);
}
| void fpthread_mutex_trylock_ | ( | pthread_mutex_t * | mutex, |
| int * | ierr | ||
| ) |
Definition at line 127 of file fpthread_lib.c.
{
*ierr = pthread_mutex_trylock(mutex);
}
| void fpthread_mutex_unlock_ | ( | pthread_mutex_t * | mutex, |
| int * | ierr | ||
| ) |
Definition at line 132 of file fpthread_lib.c.
{
*ierr = pthread_mutex_unlock(mutex);
}
| void fpthread_mutex_destroy_ | ( | pthread_mutex_t * | mutex, |
| int * | ierr | ||
| ) |
Definition at line 137 of file fpthread_lib.c.
{
*ierr = pthread_mutex_destroy(mutex);
}
| void fpthread_cond_init_ | ( | pthread_cond_t * | cond, |
| pthread_condattr_t * | attr, | ||
| int * | ierr | ||
| ) |
CONDITION VARIABLE support not yet supported: pthread_cond_timedwait
Definition at line 147 of file fpthread_lib.c.
{
*ierr = pthread_cond_init(cond,attr);
}
| void fpthread_cond_signal_ | ( | pthread_cond_t * | cond, |
| int * | ierr | ||
| ) |
Definition at line 152 of file fpthread_lib.c.
{
*ierr = pthread_cond_signal(cond);
}
| void fpthread_cond_broadcast_ | ( | pthread_cond_t * | cond, |
| int * | ierr | ||
| ) |
Definition at line 157 of file fpthread_lib.c.
{
*ierr = pthread_cond_broadcast(cond);
}
| void fpthread_cond_wait_ | ( | pthread_cond_t * | cond, |
| pthread_mutex_t * | mutex, | ||
| int * | ierr | ||
| ) |
Definition at line 162 of file fpthread_lib.c.
{
*ierr = pthread_cond_wait(cond,mutex);
}
| void fpthread_cond_destroy_ | ( | pthread_cond_t * | cond, |
| int * | ierr | ||
| ) |
Definition at line 167 of file fpthread_lib.c.
{
*ierr = pthread_cond_destroy(cond);
}
| void fpthread_attr_destroy_ | ( | pthread_attr_t * | attr, |
| int * | ierr | ||
| ) |
ATTRIBUTE support
Definition at line 177 of file fpthread_lib.c.
{
*ierr = pthread_attr_destroy(attr);
}
| void fpthread_attr_init_ | ( | pthread_attr_t * | attr, |
| int * | ierr | ||
| ) |
Definition at line 182 of file fpthread_lib.c.
{
*ierr = pthread_attr_init(attr);
}
| void fpthread_attr_getdetachstate_ | ( | pthread_attr_t * | attr, |
| int * | detachstate, | ||
| int * | ierr | ||
| ) |
Definition at line 187 of file fpthread_lib.c.
{
*ierr = pthread_attr_getdetachstate(attr, detachstate);
}
| void fpthread_attr_setdetachstate_ | ( | pthread_attr_t * | attr, |
| int * | detachstate, | ||
| int * | ierr | ||
| ) |
Definition at line 192 of file fpthread_lib.c.
{
// printf("%d %d \n",PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS);
*ierr = pthread_attr_setdetachstate(attr, *detachstate);
}
| void fpthread_attr_getstacksize_ | ( | pthread_attr_t * | attr, |
| size_t * | stacksize, | ||
| int * | ierr | ||
| ) |
Definition at line 198 of file fpthread_lib.c.
{
*ierr = pthread_attr_getstacksize(attr, stacksize);
}
| void fpthread_attr_setstacksize_ | ( | pthread_attr_t * | attr, |
| size_t * | stacksize, | ||
| int * | ierr | ||
| ) |
Definition at line 203 of file fpthread_lib.c.
{
*ierr = pthread_attr_setstacksize(attr, *stacksize);
}
| void fpthread_attr_getstack_ | ( | pthread_attr_t * | attr, |
| size_t * | stackaddr, | ||
| size_t * | stacksize, | ||
| int * | ierr | ||
| ) |
Definition at line 208 of file fpthread_lib.c.
{
void * cstackaddr;
*ierr = pthread_attr_getstack(attr, &cstackaddr, stacksize);
*stackaddr = (int *)cstackaddr;
}
| void fpthread_attr_getscope_ | ( | pthread_attr_t * | attr, |
| int * | scope, | ||
| int * | ierr | ||
| ) |
Definition at line 215 of file fpthread_lib.c.
{
*ierr = pthread_attr_getscope(attr, scope);
}
| void fpthread_attr_setscope_ | ( | pthread_attr_t * | attr, |
| int * | scope, | ||
| int * | ierr | ||
| ) |
Definition at line 220 of file fpthread_lib.c.
{
*ierr = pthread_attr_setscope(attr, *scope);
}
| void fpthread_attr_getschedpolicy_ | ( | pthread_attr_t * | attr, |
| int * | schedpolicy, | ||
| int * | ierr | ||
| ) |
Definition at line 225 of file fpthread_lib.c.
{
*ierr = pthread_attr_getschedpolicy(attr, schedpolicy);
}
| void fpthread_attr_setschedpolicy_ | ( | pthread_attr_t * | attr, |
| int * | schedpolicy, | ||
| int * | ierr | ||
| ) |
Definition at line 230 of file fpthread_lib.c.
{
*ierr = pthread_attr_setschedpolicy(attr, *schedpolicy);
}
| void fpthread_attr_getschedparam_ | ( | pthread_attr_t * | attr, |
| struct sched_param * | schedparam, | ||
| int * | ierr | ||
| ) |
Definition at line 235 of file fpthread_lib.c.
{
*ierr = pthread_attr_getschedparam(attr, schedparam);
}
| void fpthread_attr_setschedparam_ | ( | pthread_attr_t * | attr, |
| struct sched_param * | schedparam, | ||
| int * | ierr | ||
| ) |
Definition at line 240 of file fpthread_lib.c.
{
*ierr = pthread_attr_setschedparam(attr, schedparam);
}