mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
142 lines
5.6 KiB
C
142 lines
5.6 KiB
C
|
/* $Id: pthread.h,v 1.4 2002/10/29 04:45:16 rex Exp $
|
||
|
*/
|
||
|
/*
|
||
|
* pthread.h
|
||
|
*
|
||
|
* threads. Conforming to the Single UNIX(r) Specification Version 2,
|
||
|
* System Interface & Headers Issue 5
|
||
|
*
|
||
|
* This file is part of the ReactOS Operating System.
|
||
|
*
|
||
|
* Contributors:
|
||
|
* Created by KJK::Hyperion <noog@libero.it>
|
||
|
*
|
||
|
* THIS SOFTWARE IS NOT COPYRIGHTED
|
||
|
*
|
||
|
* This source code is offered for use in the public domain. You may
|
||
|
* use, modify or distribute it freely.
|
||
|
*
|
||
|
* This code is distributed in the hope that it will be useful but
|
||
|
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||
|
* DISCLAMED. This includes but is not limited to warranties of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||
|
*
|
||
|
*/
|
||
|
#ifndef __PTHREAD_H_INCLUDED__
|
||
|
#define __PTHREAD_H_INCLUDED__
|
||
|
|
||
|
/* INCLUDES */
|
||
|
#include <sched.h>
|
||
|
#include <time.h>
|
||
|
|
||
|
/* OBJECTS */
|
||
|
|
||
|
/* TYPES */
|
||
|
|
||
|
/* CONSTANTS */
|
||
|
#define PTHREAD_MUTEX_NORMAL (1)
|
||
|
#define PTHREAD_MUTEX_ERRORCHECK (2)
|
||
|
#define PTHREAD_MUTEX_RECURSIVE (3)
|
||
|
|
||
|
#define PTHREAD_MUTEX_DEFAULT (PTHREAD_MUTEX_NORMAL)
|
||
|
|
||
|
#define PTHREAD_PROCESS_PRIVATE (1)
|
||
|
#define PTHREAD_PROCESS_SHARED (2)
|
||
|
|
||
|
#define PTHREAD_PRIO_NONE (1)
|
||
|
|
||
|
/* PROTOTYPES */
|
||
|
int pthread_attr_destroy(pthread_attr_t *);
|
||
|
int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
|
||
|
int pthread_attr_getguardsize(const pthread_attr_t *, size_t *);
|
||
|
int pthread_attr_getinheritsched(const pthread_attr_t *, int *);
|
||
|
int pthread_attr_getschedparam(const pthread_attr_t *,
|
||
|
struct sched_param *);
|
||
|
int pthread_attr_getschedpolicy(const pthread_attr_t *, int *);
|
||
|
int pthread_attr_getscope(const pthread_attr_t *, int *);
|
||
|
int pthread_attr_getstackaddr(const pthread_attr_t *, void **);
|
||
|
int pthread_attr_getstacksize(const pthread_attr_t *, size_t *);
|
||
|
int pthread_attr_init(pthread_attr_t *);
|
||
|
int pthread_attr_setdetachstate(pthread_attr_t *, int);
|
||
|
int pthread_attr_setguardsize(pthread_attr_t *, size_t);
|
||
|
int pthread_attr_setinheritsched(pthread_attr_t *, int);
|
||
|
int pthread_attr_setschedparam(pthread_attr_t *,
|
||
|
const struct sched_param *);
|
||
|
int pthread_attr_setschedpolicy(pthread_attr_t *, int);
|
||
|
int pthread_attr_setscope(pthread_attr_t *, int);
|
||
|
int pthread_attr_setstackaddr(pthread_attr_t *, void *);
|
||
|
int pthread_attr_setstacksize(pthread_attr_t *, size_t);
|
||
|
int pthread_cancel(pthread_t);
|
||
|
void pthread_cleanup_push(void (*)(void *), void *);
|
||
|
void pthread_cleanup_pop(int);
|
||
|
int pthread_cond_broadcast(pthread_cond_t *);
|
||
|
int pthread_cond_destroy(pthread_cond_t *);
|
||
|
int pthread_cond_init(pthread_cond_t *, const pthread_condattr_t *);
|
||
|
int pthread_cond_signal(pthread_cond_t *);
|
||
|
int pthread_cond_timedwait(pthread_cond_t *,
|
||
|
pthread_mutex_t *, const struct timespec *);
|
||
|
int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *);
|
||
|
int pthread_condattr_destroy(pthread_condattr_t *);
|
||
|
int pthread_condattr_getpshared(const pthread_condattr_t *, int *);
|
||
|
int pthread_condattr_init(pthread_condattr_t *);
|
||
|
int pthread_condattr_setpshared(pthread_condattr_t *, int);
|
||
|
int pthread_create(pthread_t *, const pthread_attr_t *,
|
||
|
void *(*)(void *), void *);
|
||
|
int pthread_detach(pthread_t);
|
||
|
int pthread_equal(pthread_t, pthread_t);
|
||
|
void pthread_exit(void *);
|
||
|
int pthread_getconcurrency(void);
|
||
|
int pthread_getschedparam(pthread_t, int *, struct sched_param *);
|
||
|
void *pthread_getspecific(pthread_key_t);
|
||
|
int pthread_join(pthread_t, void **);
|
||
|
int pthread_key_create(pthread_key_t *, void (*)(void *));
|
||
|
int pthread_key_delete(pthread_key_t);
|
||
|
int pthread_mutex_destroy(pthread_mutex_t *);
|
||
|
int pthread_mutex_getprioceiling(const pthread_mutex_t *, int *);
|
||
|
int pthread_mutex_init(pthread_mutex_t *, const pthread_mutexattr_t *);
|
||
|
int pthread_mutex_lock(pthread_mutex_t *);
|
||
|
int pthread_mutex_setprioceiling(pthread_mutex_t *, int, int *);
|
||
|
int pthread_mutex_trylock(pthread_mutex_t *);
|
||
|
int pthread_mutex_unlock(pthread_mutex_t *);
|
||
|
int pthread_mutexattr_destroy(pthread_mutexattr_t *);
|
||
|
int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *,
|
||
|
int *);
|
||
|
int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *, int *);
|
||
|
int pthread_mutexattr_getpshared(const pthread_mutexattr_t *, int *);
|
||
|
int pthread_mutexattr_gettype(const pthread_mutexattr_t *, int *);
|
||
|
int pthread_mutexattr_init(pthread_mutexattr_t *);
|
||
|
int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int);
|
||
|
int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int);
|
||
|
int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int);
|
||
|
int pthread_mutexattr_settype(pthread_mutexattr_t *, int);
|
||
|
int pthread_once(pthread_once_t *, void (*)(void));
|
||
|
int pthread_rwlock_destroy(pthread_rwlock_t *);
|
||
|
int pthread_rwlock_init(pthread_rwlock_t *,
|
||
|
const pthread_rwlockattr_t *);
|
||
|
int pthread_rwlock_rdlock(pthread_rwlock_t *);
|
||
|
int pthread_rwlock_tryrdlock(pthread_rwlock_t *);
|
||
|
int pthread_rwlock_trywrlock(pthread_rwlock_t *);
|
||
|
int pthread_rwlock_unlock(pthread_rwlock_t *);
|
||
|
int pthread_rwlock_wrlock(pthread_rwlock_t *);
|
||
|
int pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
|
||
|
int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *,
|
||
|
int *);
|
||
|
int pthread_rwlockattr_init(pthread_rwlockattr_t *);
|
||
|
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int);
|
||
|
pthread_t
|
||
|
pthread_self(void);
|
||
|
int pthread_setcancelstate(int, int *);
|
||
|
int pthread_setcanceltype(int, int *);
|
||
|
int pthread_setconcurrency(int);
|
||
|
int pthread_setschedparam(pthread_t, int ,
|
||
|
const struct sched_param *);
|
||
|
int pthread_setspecific(pthread_key_t, const void *);
|
||
|
void pthread_testcancel(void);
|
||
|
|
||
|
/* MACROS */
|
||
|
|
||
|
#endif /* __PTHREAD_H_INCLUDED__ */
|
||
|
|
||
|
/* EOF */
|
||
|
|