pthread.h File Reference

API published in:
API deprecated in:


#include <_ansi.h>
#include <pthreadtypes.h>
#include <sched.h>
#include <e32def.h>
#include <stddef.h>
#include <time.h>
#include <limits.h>
#include <pthreadalias.h>

Go to the source code of this file.


Data Structures

struct   pthread_mutex_t
struct   pthread_mutexattr_t
struct   _CondQueue
struct   pthread_cond_t

Defines

#define  POSIX_THREAD_DESTRUCTOR_ITERATIONS   4
#define  POSIX_THREAD_KEYS_MAX   128
#define  PTHREAD_STACK_MIN   0x2000
#define  POSIX_THREAD_THREADS_MAX   64
#define  PTHREAD_THREADS_MAX   1024
#define  POSIX_SEM_NSEMS_MAX   256
#define  SEM_NSEMS_MAX   1024
#define  _POSIX_SEM_VALUE_MAX   32767
#define  SEM_VALUE_MAX   INT_MAX
#define  PTHREAD_ONCE_INIT   _ENotDone
#define  PTHREAD_MUTEX_INITIALIZER   { _ENeedsNormalInit, NULL,0 }
#define  PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP   { _ENeedsRecursiveInit, NULL, 0 }
#define  PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP   { _ENeedsErrorCheckInit, NULL,0 }
#define  PTHREAD_COND_INITIALIZER   { _ENeedsNormalInit, NULL,NULL };

Typedefs

typedef int  pthread_once_t
typedef _pthread_condattr_t *  pthread_condattr_t
typedef void *(*  thread_begin_routine )(void *)
typedef void(*  thread_init_routine )(void)
typedef void(*  destructor_routine )(void *)

Enumerations

enum   _handle_state {
  _ENeedsNormalInit = -3, _ENeedsRecursiveInit, _ENeedsErrorCheckInit, _EInitialized = 1,
  _EDestroyed, _EInvalid
}
enum   _LockStatus { _ELockNotCreated, _ELockCreating, _ELockCreated }
enum   _OnceStatus { _ENotDone, _EDoing, _EDone }
enum   { PTHREAD_CREATE_JOINABLE = 0, PTHREAD_CREATE_DETACHED = 1 }
enum   { PTHREAD_SCOPE_SYSTEM = 1 }
enum   { PTHREAD_CANCEL_ASYNCHRONOUS = 0, PTHREAD_CANCEL_DEFERRED = 1 }
enum   { PTHREAD_PROCESS_PRIVATE = 0 }
enum   { PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL }

Functions

IMPORT_C int  pthread_create (pthread_t *threadhdl, pthread_attr_t *attrib, thread_begin_routine begin_routine, void *param)
IMPORT_C pthread_t  pthread_self ()
IMPORT_C int  pthread_equal (pthread_t t1, pthread_t t2)
IMPORT_C int  pthread_join (pthread_t thHandle, void **retValPtr)
IMPORT_C int  pthread_detach (pthread_t thrHandle)
IMPORT_C void  pthread_exit (void *retValPtr)
IMPORT_C int  pthread_attr_init (pthread_attr_t *attrib)
IMPORT_C int  pthread_attr_destroy (pthread_attr_t *attrib)
IMPORT_C int  pthread_attr_getdetachstate (const pthread_attr_t *attrib, int *detState)
IMPORT_C int  pthread_attr_setdetachstate (pthread_attr_t *attrib, int detState)
IMPORT_C int  pthread_attr_getstacksize (const pthread_attr_t *attrib, size_t *stkSize)
IMPORT_C int  pthread_attr_setstacksize (pthread_attr_t *attrib, size_t stkSize)
IMPORT_C int  pthread_once (pthread_once_t *once_control, thread_init_routine init_routine)
IMPORT_C int  pthread_mutexattr_init (pthread_mutexattr_t *attr)
IMPORT_C int  pthread_mutexattr_destroy (pthread_mutexattr_t *attr)
IMPORT_C int  pthread_mutexattr_getpshared (const pthread_mutexattr_t *attr, int *pshared)
IMPORT_C int  pthread_mutexattr_setpshared (pthread_mutexattr_t *attr, int pshared)
IMPORT_C int  pthread_mutexattr_gettype (pthread_mutexattr_t *attr, int *type)
IMPORT_C int  pthread_mutexattr_settype (pthread_mutexattr_t *attr, int type)
IMPORT_C int  pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
IMPORT_C int  pthread_mutex_destroy (pthread_mutex_t *mutex)
IMPORT_C int  pthread_mutex_lock (pthread_mutex_t *mutex)
IMPORT_C int  pthread_mutex_timedlock (pthread_mutex_t *mutex, const struct timespec *abstime)
IMPORT_C int  pthread_mutex_trylock (pthread_mutex_t *mutex)
IMPORT_C int  pthread_mutex_unlock (pthread_mutex_t *mutex)
IMPORT_C int  pthread_condattr_init (pthread_condattr_t *attr)
IMPORT_C int  pthread_condattr_destroy (pthread_condattr_t *attr)
IMPORT_C int  pthread_cond_init (pthread_cond_t *cond, const pthread_condattr_t *attr)
IMPORT_C int  pthread_cond_destroy (pthread_cond_t *cond)
IMPORT_C int  pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime)
IMPORT_C int  pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex)
IMPORT_C int  pthread_cond_signal (pthread_cond_t *cond)
IMPORT_C int  pthread_cond_broadcast (pthread_cond_t *cond)
IMPORT_C int  pthread_key_create (pthread_key_t *key, destructor_routine dest)
IMPORT_C int  pthread_key_delete (pthread_key_t key)
IMPORT_C int  pthread_setspecific (pthread_key_t key, const void *val)
IMPORT_C void *  pthread_getspecific (pthread_key_t key)
IMPORT_C int  pthread_attr_getscope (const pthread_attr_t *attrib, int *scope)
IMPORT_C int  pthread_attr_setscope (pthread_attr_t *attrib, int conscope)
IMPORT_C int  pthread_attr_setschedpolicy (pthread_attr_t *attrib, int policy)
IMPORT_C int  pthread_attr_getschedpolicy (const pthread_attr_t *attrib, int *policy)
IMPORT_C int  pthread_attr_getschedparam (const pthread_attr_t *attrib, struct sched_param *param)
IMPORT_C int  pthread_attr_setschedparam (pthread_attr_t *attrib, const struct sched_param *param)
IMPORT_C int  pthread_getschedparam (pthread_t thr, int *policy, struct sched_param *param)
IMPORT_C int  pthread_setschedparam (pthread_t th, int policy, const struct sched_param *param)

Define Documentation

#define _POSIX_SEM_VALUE_MAX   32767
 
#define POSIX_SEM_NSEMS_MAX   256
 
#define POSIX_THREAD_DESTRUCTOR_ITERATIONS   4
 
#define POSIX_THREAD_KEYS_MAX   128
 
#define POSIX_THREAD_THREADS_MAX   64
 
#define PTHREAD_COND_INITIALIZER   { _ENeedsNormalInit, NULL,NULL };
 
#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP   { _ENeedsErrorCheckInit, NULL,0 }
 
#define PTHREAD_MUTEX_INITIALIZER   { _ENeedsNormalInit, NULL,0 }
 
#define PTHREAD_ONCE_INIT   _ENotDone
 
#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP   { _ENeedsRecursiveInit, NULL, 0 }
 
#define PTHREAD_STACK_MIN   0x2000
 
#define PTHREAD_THREADS_MAX   1024
 
#define SEM_NSEMS_MAX   1024
 
#define SEM_VALUE_MAX   INT_MAX
 

Typedef Documentation

typedef void(* destructor_routine)(void *)
 
typedef struct _pthread_condattr_t* pthread_condattr_t
 
typedef int pthread_once_t
 
typedef void*(* thread_begin_routine)(void *)
 
typedef void(* thread_init_routine)(void)
 

Enumeration Type Documentation

anonymous enum
 
Enumerator:
PTHREAD_CREATE_JOINABLE 
PTHREAD_CREATE_DETACHED 
anonymous enum
 
Enumerator:
PTHREAD_SCOPE_SYSTEM 
anonymous enum
 
Enumerator:
PTHREAD_CANCEL_ASYNCHRONOUS 
PTHREAD_CANCEL_DEFERRED 
anonymous enum
 
Enumerator:
PTHREAD_PROCESS_PRIVATE 
anonymous enum
 
Enumerator:
PTHREAD_MUTEX_NORMAL 
PTHREAD_MUTEX_RECURSIVE 
PTHREAD_MUTEX_ERRORCHECK 
PTHREAD_MUTEX_DEFAULT 
enum _handle_state
 
Enumerator:
_ENeedsNormalInit 
_ENeedsRecursiveInit 
_ENeedsErrorCheckInit 
_EInitialized 
_EDestroyed 
_EInvalid 
enum _LockStatus
 
Enumerator:
_ELockNotCreated 
_ELockCreating 
_ELockCreated 
enum _OnceStatus
 
Enumerator:
_ENotDone 
_EDoing 
_EDone 

Function Documentation

IMPORT_C int pthread_attr_destroy pthread_attr_t attrib  ) 
 
IMPORT_C int pthread_attr_getdetachstate const pthread_attr_t attrib,
int *  detState
 
IMPORT_C int pthread_attr_getschedparam const pthread_attr_t attrib,
struct sched_param param
 
IMPORT_C int pthread_attr_getschedpolicy const pthread_attr_t attrib,
int *  policy
 
IMPORT_C int pthread_attr_getscope const pthread_attr_t attrib,
int *  scope
 
IMPORT_C int pthread_attr_getstacksize const pthread_attr_t attrib,
size_t stkSize
 
IMPORT_C int pthread_attr_init pthread_attr_t attrib  ) 
 
IMPORT_C int pthread_attr_setdetachstate pthread_attr_t attrib,
int  detState
 
IMPORT_C int pthread_attr_setschedparam pthread_attr_t attrib,
const struct sched_param param
 
IMPORT_C int pthread_attr_setschedpolicy pthread_attr_t attrib,
int  policy
 
IMPORT_C int pthread_attr_setscope pthread_attr_t attrib,
int  conscope
 
IMPORT_C int pthread_attr_setstacksize pthread_attr_t attrib,
size_t  stkSize
 
IMPORT_C int pthread_cond_broadcast pthread_cond_t cond  ) 
 
IMPORT_C int pthread_cond_destroy pthread_cond_t cond  ) 
 
IMPORT_C int pthread_cond_init pthread_cond_t cond,
const pthread_condattr_t attr
 
IMPORT_C int pthread_cond_signal pthread_cond_t cond  ) 
 
IMPORT_C int pthread_cond_timedwait pthread_cond_t cond,
pthread_mutex_t mutex,
const struct timespec abstime
 
IMPORT_C int pthread_cond_wait pthread_cond_t cond,
pthread_mutex_t mutex
 
IMPORT_C int pthread_condattr_destroy pthread_condattr_t attr  ) 
 
IMPORT_C int pthread_condattr_init pthread_condattr_t attr  ) 
 
IMPORT_C int pthread_create pthread_t threadhdl,
pthread_attr_t attrib,
thread_begin_routine  begin_routine,
void *  param
 
IMPORT_C int pthread_detach pthread_t  thrHandle  ) 
 
IMPORT_C int pthread_equal pthread_t  t1,
pthread_t  t2
 
IMPORT_C void pthread_exit void *  retValPtr  ) 
 
IMPORT_C int pthread_getschedparam pthread_t  thr,
int *  policy,
struct sched_param param
 
IMPORT_C void* pthread_getspecific pthread_key_t  key  ) 
 
IMPORT_C int pthread_join pthread_t  thHandle,
void **  retValPtr
 
IMPORT_C int pthread_key_create pthread_key_t key,
destructor_routine  dest
 
IMPORT_C int pthread_key_delete pthread_key_t  key  ) 
 
IMPORT_C int pthread_mutex_destroy pthread_mutex_t mutex  ) 
 
IMPORT_C int pthread_mutex_init pthread_mutex_t mutex,
const pthread_mutexattr_t attr
 
IMPORT_C int pthread_mutex_lock pthread_mutex_t mutex  ) 
 
IMPORT_C int pthread_mutex_timedlock pthread_mutex_t mutex,
const struct timespec abstime
 
IMPORT_C int pthread_mutex_trylock pthread_mutex_t mutex  ) 
 
IMPORT_C int pthread_mutex_unlock pthread_mutex_t mutex  ) 
 
IMPORT_C int pthread_mutexattr_destroy pthread_mutexattr_t attr  ) 
 
IMPORT_C int pthread_mutexattr_getpshared const pthread_mutexattr_t attr,
int *  pshared
 
IMPORT_C int pthread_mutexattr_gettype pthread_mutexattr_t attr,
int *  type
 
IMPORT_C int pthread_mutexattr_init pthread_mutexattr_t attr  ) 
 
IMPORT_C int pthread_mutexattr_setpshared pthread_mutexattr_t attr,
int  pshared
 
IMPORT_C int pthread_mutexattr_settype pthread_mutexattr_t attr,
int  type
 
IMPORT_C int pthread_once pthread_once_t once_control,
thread_init_routine  init_routine
 
IMPORT_C pthread_t pthread_self  ) 
 
IMPORT_C int pthread_setschedparam pthread_t  th,
int  policy,
const struct sched_param param
 
IMPORT_C int pthread_setspecific pthread_key_t  key,
const void *  val
 

Copyright © Nokia Corporation 2001-2008
Back to top