/* $Id$ -*- C -*- * ============================================================================= * * = LIBRARY * pace * * = FILENAME * pace/win32/pthread.inl * * = AUTHOR * Luther Baker * * ============================================================================= */ #include "pace/unistd.h" #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void)) { PACE_UNUSED_ARG (prepare); PACE_UNUSED_ARG (parent); PACE_UNUSED_ARG (child); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_create (pace_pthread_t * thread, const pace_pthread_attr_t * attr, void * (*start_routine) (void*), void * arg) { PACE_UNUSED_ARG (thread); PACE_UNUSED_ARG (attr); PACE_UNUSED_ARG (start_routine); PACE_UNUSED_ARG (arg); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE pace_pthread_t pace_pthread_self () { return pthread_self (); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_getschedparam (pace_pthread_t thread, int * policy, pace_sched_param * param) { return pthread_getschedparam (thread, policy, param); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_setschedparam (pace_pthread_t thread, int policy, const pace_sched_param * param) { return pthread_setschedparam (thread, policy, param); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_init (pace_pthread_attr_t * attr) { return pthread_attr_init (attr); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_destroy (pace_pthread_attr_t * attr) { return pthread_attr_destroy (attr); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_getdetachstate (const pace_pthread_attr_t * attr, int * detachstate) { return pthread_attr_getdetachstate (attr, detachstate); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_setdetachstate (pace_pthread_attr_t * attr, int detachstate) { return pthread_attr_setdetachstate (attr, detachstate); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_getinheritsched (const pace_pthread_attr_t * attr, int * inheritsched) { return pthread_attr_getinheritsched (attr, inheritsched); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_setinheritsched (pace_pthread_attr_t * attr, int inheritsched) { return pthread_attr_setinheritsched (attr, inheritsched); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_getschedparam (const pace_pthread_attr_t * attr, pace_sched_param * param) { return pthread_attr_getschedparam (attr, param); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_setschedparam (pace_pthread_attr_t * attr, const pace_sched_param * param) { return pthread_attr_setschedparam (attr, param); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_getschedpolicy (const pace_pthread_attr_t * attr, int * policy) { return pthread_attr_getschedpolicy (attr, policy); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_setschedpolicy (pace_pthread_attr_t * attr, int policy) { return pthread_attr_setschedpolicy (attr, policy); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_getscope (const pace_pthread_attr_t * attr, int * contentionscope) { return pthread_attr_getscope (attr, contentionscope); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_setscope (pace_pthread_attr_t * attr, int contentionscope) { return pthread_attr_setscope (attr, contentionscope); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_getstackaddr (const pace_pthread_attr_t * attr, void ** stackaddr) { return pthread_attr_getstackaddr (attr, stackaddr); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_setstackaddr (pace_pthread_attr_t * attr, void * stackaddr) { return pthread_attr_setstackaddr (attr, stackaddr); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_getstacksize (const pace_pthread_attr_t * attr, size_t * stacksize) { return pthread_attr_getstacksize (attr, stacksize); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_attr_setstacksize (pace_pthread_attr_t * attr, size_t stacksize) { return pthread_attr_setstacksize (attr, stacksize); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_cancel (pace_pthread_t thread) { PACE_UNUSED_ARG (thread); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_cond_broadcast (pace_pthread_cond_t * cond) { PACE_UNUSED_ARG (cond); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_cond_destroy (pace_pthread_cond_t * cond) { PACE_UNUSED_ARG (cond); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_cond_init (pace_pthread_cond_t * cond, const pace_pthread_condattr_t * attr) { PACE_UNUSED_ARG (cond); PACE_UNUSED_ARG (attr); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_cond_signal (pace_pthread_cond_t * cond) { PACE_UNUSED_ARG (cond); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_cond_timedwait (pace_pthread_cond_t * cond, pace_pthread_mutex_t * mutex, const struct timespec * abstime) { PACE_UNUSED_ARG (cond); PACE_UNUSED_ARG (mutex); PACE_UNUSED_ARG (abstime); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_cond_wait (pace_pthread_cond_t * cond, pace_pthread_mutex_t * mutex) { PACE_UNUSED_ARG (cond); PACE_UNUSED_ARG (mutex); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_condattr_destroy (pace_pthread_condattr_t * attr) { PACE_UNUSED_ARG (attr); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_condattr_getpshared (const pace_pthread_condattr_t * attr, int * pshared) { PACE_UNUSED_ARG (attr); PACE_UNUSED_ARG (pshared); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_condattr_init (pace_pthread_condattr_t * attr) { PACE_UNUSED_ARG (attr); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_condattr_setpshared (pace_pthread_condattr_t * attr, int pshared) { PACE_UNUSED_ARG (attr); PACE_UNUSED_ARG (pshared); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_detach (pace_pthread_t thread) { PACE_UNUSED_ARG (thread); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_equal (pace_pthread_t t1, pace_pthread_t t2) { return t1 == t2; } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE void pace_pthread_exit (void * value_ptr) { PACE_UNUSED_ARG (value_ptr); PACE_ERRNO_NO_SUPPORT (); return; } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE void * pace_pthread_getspecific (pace_pthread_key_t key) { void * retval = (void*)0; PACE_UNUSED_ARG (key); PACE_ERRNO_NO_SUPPORT_RETURN (retval); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_join (pace_pthread_t thread, void ** value_ptr) { PACE_UNUSED_ARG (thread); PACE_UNUSED_ARG (value_ptr); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_key_create (pace_pthread_key_t * key, void (*destructor)(void*)) { PACE_UNUSED_ARG (key); PACE_UNUSED_ARG (destructor); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_key_delete (pace_pthread_key_t key) { PACE_UNUSED_ARG (key); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_kill (pace_pthread_t thread, int sig) { PACE_UNUSED_ARG (thread); PACE_UNUSED_ARG (sig); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutex_destroy (pace_pthread_mutex_t * mutex) { PACE_UNUSED_ARG (mutex); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutex_getprioceiling (pace_pthread_mutex_t * mutex, int * prioceiling) { PACE_UNUSED_ARG (mutex); PACE_UNUSED_ARG (prioceiling); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutex_init (pace_pthread_mutex_t * mutex, const pace_pthread_mutexattr_t * attr) { PACE_UNUSED_ARG (mutex); PACE_UNUSED_ARG (attr); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutex_lock (pace_pthread_mutex_t * mutex) { PACE_UNUSED_ARG (mutex); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutex_setprioceiling (pace_pthread_mutex_t * mutex, int prioceiling, int * old_ceiling) { PACE_UNUSED_ARG (mutex); PACE_UNUSED_ARG (prioceiling); PACE_UNUSED_ARG (old_ceiling); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutex_trylock (pace_pthread_mutex_t * mutex) { PACE_UNUSED_ARG (mutex); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutex_unlock (pace_pthread_mutex_t * mutex) { PACE_UNUSED_ARG (mutex); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutexattr_destroy (pace_pthread_mutexattr_t * attr) { PACE_UNUSED_ARG (attr); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutexattr_getprioceiling (pace_pthread_mutexattr_t * attr, int * prioceiling) { PACE_UNUSED_ARG (attr); PACE_UNUSED_ARG (prioceiling); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutexattr_getprotocol (const pace_pthread_mutexattr_t * attr, int * protocol) { PACE_UNUSED_ARG (attr); PACE_UNUSED_ARG (protocol); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutexattr_setprioceiling (pace_pthread_mutexattr_t * attr, int prioceiling) { PACE_UNUSED_ARG (attr); PACE_UNUSED_ARG (prioceiling); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutexattr_setprotocol (pace_pthread_mutexattr_t * attr, int protocol) { PACE_UNUSED_ARG (attr); PACE_UNUSED_ARG (protocol); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutexattr_getpshared (const pace_pthread_mutexattr_t * attr, int * pshared) { PACE_UNUSED_ARG (attr); PACE_UNUSED_ARG (pshared); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutexattr_init (pace_pthread_mutexattr_t * attr) { PACE_UNUSED_ARG (attr); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_mutexattr_setpshared (pace_pthread_mutexattr_t * attr, int pshared) { PACE_UNUSED_ARG (attr); PACE_UNUSED_ARG (pshared); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_once (pace_pthread_once_t * once_control, void (*void_routine) (void)) { PACE_UNUSED_ARG (once_control); PACE_UNUSED_ARG (void_routine); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_setcancelstate (int state, int * oldstate) { PACE_UNUSED_ARG (state); PACE_UNUSED_ARG (oldstate); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_setcanceltype (int type, int * oldtype) { PACE_UNUSED_ARG (type); PACE_UNUSED_ARG (oldtype); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_setspecific (pace_pthread_key_t key, const void * value) { PACE_UNUSED_ARG (key); PACE_UNUSED_ARG (value); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE int pace_pthread_sigmask (int how, const pace_sigset_t * set, pace_sigset_t * oset) { PACE_UNUSED_ARG (how); PACE_UNUSED_ARG (set); PACE_UNUSED_ARG (oset); PACE_ERRNO_NO_SUPPORT_RETURN (-1); } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */ #if (PACE_HAS_POSIX_NONUOF_FUNCS) PACE_INLINE void pace_pthread_testcancel () { PACE_ERRNO_NO_SUPPORT (); return; } #endif /* PACE_HAS_POSIX_NONUOF_FUNCS */