📄 pthread.inl
字号:
PACE_INLINE
void
pace_pthread_exit (void * value_ptr)
{
pthread_exit (value_ptr);
return;
}
#endif /* PACE_HAS_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_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
void *
pace_pthread_getspecific (pace_pthread_key_t key)
{
#if PACE_LYNXOS == 0x300
void *value;
if (pthread_getspecific (key, &value) != 0)
return 0;
return value;
#else
return pthread_getspecific (key);
#endif /* PACE_LYNXOS != 0x300 */
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_join (pace_pthread_t thread, void ** value_ptr)
{
return pthread_join (thread, value_ptr);
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
# if defined (PACE_HAS_CPLUSPLUS)
PACE_INLINE
int
pace_pthread_key_create (pace_pthread_key_t * key,
pace_keycreate_pf destructor)
{
return pthread_key_create (key, destructor);
}
#else /* ! PACE_HAS_CPLUSPLUS */
PACE_INLINE
int
pace_pthread_key_create (pace_pthread_key_t * key,
void (*destructor)(void*))
{
return pthread_key_create (key, destructor);
}
# endif /* PACE_HAS_CPLUSPLUS */
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_key_delete (pace_pthread_key_t key)
{
return pthread_key_delete (key);
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_kill (pace_pthread_t thread, int sig)
{
return pthread_kill (thread, sig);
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_mutex_destroy (pace_pthread_mutex_t * mutex)
{
return pthread_mutex_destroy (mutex);
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_mutex_getprioceiling (pace_pthread_mutex_t * mutex,
int * prioceiling)
{
#if PACE_LINUX
errno = ENOSYS;
PACE_UNUSED_ARG (mutex);
PACE_UNUSED_ARG (prioceiling);
return -1;
#elif PACE_LYNXOS
PACE_ERRNO_NO_SUPPORT_RETURN (-1);
#else /* ! PACE_LYNXOS */
return pthread_mutex_getprioceiling (mutex, prioceiling);
#endif /* PACE_LINUX */
}
#endif /* PACE_HAS_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)
{
#if PACE_LYNXOS == 0x300
return pthread_mutex_init (mutex, *attr);
#else
return pthread_mutex_init (mutex, attr);
#endif /* PACE_LYNXOS != 0x300 */
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_mutex_lock (pace_pthread_mutex_t * mutex)
{
return pthread_mutex_lock (mutex);
}
#endif /* PACE_HAS_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)
{
#if PACE_LINUX
errno = ENOSYS;
PACE_UNUSED_ARG (mutex);
PACE_UNUSED_ARG (prioceiling);
PACE_UNUSED_ARG (old_ceiling);
return -1;
#elif PACE_LYNXOS
PACE_ERRNO_NO_SUPPORT_RETURN (-1);
#else /* ! PACE_LYNXOS */
return pthread_mutex_setprioceiling (mutex, prioceiling, old_ceiling);
#endif /* PACE_LINUX */
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_mutex_trylock (pthread_mutex_t * mutex)
{
return pthread_mutex_trylock (mutex);
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_mutex_unlock (pace_pthread_mutex_t * mutex)
{
return pthread_mutex_unlock (mutex);
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_mutexattr_destroy (pace_pthread_mutexattr_t * attr)
{
return pthread_mutexattr_destroy (attr);
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_mutexattr_getprioceiling (pace_pthread_mutexattr_t * attr,
int * prioceiling)
{
#if PACE_LINUX
errno = ENOSYS;
PACE_UNUSED_ARG (attr);
PACE_UNUSED_ARG (prioceiling);
return -1;
#else
return pthread_mutexattr_getprioceiling (attr, prioceiling);
#endif /* PACE_LINUX */
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_mutexattr_getprotocol (const pace_pthread_mutexattr_t * attr,
int * protocol)
{
#if PACE_LINUX
errno = ENOSYS;
PACE_UNUSED_ARG (attr);
PACE_UNUSED_ARG (protocol);
return -1;
#else
return pthread_mutexattr_getprotocol (PACE_NONCONST_ARG_CAST (pace_pthread_mutexattr_t *) attr, protocol);
#endif /* PACE_LINUX */
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_mutexattr_setprioceiling (pace_pthread_mutexattr_t * attr,
int prioceiling)
{
#if PACE_LINUX
errno = ENOSYS;
PACE_UNUSED_ARG (attr);
PACE_UNUSED_ARG (prioceiling);
return -1;
#else
return pthread_mutexattr_setprioceiling (attr, prioceiling);
#endif /* PACE_LINUX */
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_mutexattr_setprotocol (pace_pthread_mutexattr_t * attr,
int protocol)
{
#if PACE_LINUX
errno = ENOSYS;
PACE_UNUSED_ARG (attr);
PACE_UNUSED_ARG (protocol);
return -1;
#else
return pthread_mutexattr_setprotocol (attr, protocol);
#endif /* PACE_LINUX */
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_mutexattr_getpshared (const pace_pthread_mutexattr_t * attr,
int * pshared)
{
#if PACE_LINUX
errno = ENOSYS;
PACE_UNUSED_ARG (attr);
PACE_UNUSED_ARG (pshared);
return -1;
#else
return pthread_mutexattr_getpshared (PACE_NONCONST_ARG_CAST (pace_pthread_mutexattr_t *) attr, pshared);
#endif /* PACE_LINUX */
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_mutexattr_init (pace_pthread_mutexattr_t * attr)
{
return pthread_mutexattr_init (attr);
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_mutexattr_setpshared (pace_pthread_mutexattr_t * attr,
int pshared)
{
#if PACE_LINUX
errno = ENOSYS;
PACE_UNUSED_ARG (attr);
PACE_UNUSED_ARG (pshared);
return -1;
#else
return pthread_mutexattr_setpshared (attr, pshared);
#endif /* PACE_LINUX */
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
# if defined (PACE_HAS_CPLUSPLUS)
PACE_INLINE
int
pace_pthread_once (pace_pthread_once_t * once_control,
pace_once_pf void_routine)
{
return pthread_once (once_control, void_routine);
}
# else /* ! PACE_HAS_CPLUSPLUS */
PACE_INLINE
int
pace_pthread_once (pace_pthread_once_t * once_control,
void (*void_routine) (void))
{
return pthread_once (once_control, void_routine);
}
# endif /* PACE_HAS_CPLUSPLUS */
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
pace_pthread_t
pace_pthread_self ()
{
return pthread_self ();
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_setcancelstate (int state, int * oldstate)
{
return pthread_setcancelstate (state, oldstate);
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_setcanceltype (int type, int * oldtype)
{
return pthread_setcanceltype (type, oldtype);
}
#endif /* PACE_HAS_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_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_setspecific (pace_pthread_key_t key, const void * value)
{
return pthread_setspecific (key, PACE_NONCONST_ARG_CAST (void *) value);
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
int
pace_pthread_sigmask (int how, const sigset_t * set,
sigset_t * oset)
{
return pthread_sigmask (how, set, oset);
}
#endif /* PACE_HAS_NONUOF_FUNCS */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
PACE_INLINE
void
pace_pthread_testcancel ()
{
pthread_testcancel ();
return;
}
#endif /* PACE_HAS_NONUOF_FUNCS */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -