To be consistent, use the __weak_reference macro from <sys/cdefs.h>
instead of #pragma weak to create weak definitions. Suggested by: bde
This commit is contained in:
parent
54fd7f685f
commit
437df4859a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=75369
@ -39,7 +39,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak accept=_accept
|
||||
__weak_reference(_accept, accept);
|
||||
|
||||
int
|
||||
_accept(int fd, struct sockaddr * name, socklen_t *namelen)
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak __acl_aclcheck_fd=___acl_aclcheck_fd
|
||||
__weak_reference(___acl_aclcheck_fd, __acl_aclcheck_fd);
|
||||
|
||||
int
|
||||
___acl_aclcheck_fd(int fd, acl_type_t tp, acl_t acl)
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak __acl_delete_fd=___acl_delete_fd
|
||||
__weak_reference(___acl_delete_fd, __acl_delete_fd);
|
||||
|
||||
int
|
||||
___acl_delete_fd(int fd, acl_type_t tp)
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak __acl_get_fd=___acl_get_fd
|
||||
__weak_reference(___acl_get_fd, __acl_get_fd);
|
||||
|
||||
int
|
||||
___acl_get_fd(int fd, acl_type_t tp, struct acl *acl_p)
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak __acl_set_fd=___acl_set_fd
|
||||
__weak_reference(___acl_set_fd, __acl_set_fd);
|
||||
|
||||
int
|
||||
___acl_set_fd(int fd, acl_type_t tp, struct acl *acl_p)
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak aio_suspend=_aio_suspend
|
||||
__weak_reference(_aio_suspend, aio_suspend);
|
||||
|
||||
int
|
||||
_aio_suspend(const struct aiocb * const iocbs[], int niocb, const struct
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_destroy=_pthread_attr_destroy
|
||||
__weak_reference(_pthread_attr_destroy, pthread_attr_destroy);
|
||||
|
||||
int
|
||||
_pthread_attr_destroy(pthread_attr_t *attr)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_getdetachstate=_pthread_attr_getdetachstate
|
||||
__weak_reference(_pthread_attr_getdetachstate, pthread_attr_getdetachstate);
|
||||
|
||||
int
|
||||
_pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_getinheritsched=_pthread_attr_getinheritsched
|
||||
__weak_reference(_pthread_attr_getinheritsched, pthread_attr_getinheritsched);
|
||||
|
||||
int
|
||||
_pthread_attr_getinheritsched(const pthread_attr_t *attr, int *sched_inherit)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_getschedparam=_pthread_attr_getschedparam
|
||||
__weak_reference(_pthread_attr_getschedparam, pthread_attr_getschedparam);
|
||||
|
||||
int
|
||||
_pthread_attr_getschedparam(const pthread_attr_t *attr, struct sched_param *param)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_getschedpolicy=_pthread_attr_getschedpolicy
|
||||
__weak_reference(_pthread_attr_getschedpolicy, pthread_attr_getschedpolicy);
|
||||
|
||||
int
|
||||
_pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_getscope=_pthread_attr_getscope
|
||||
__weak_reference(_pthread_attr_getscope, pthread_attr_getscope);
|
||||
|
||||
int
|
||||
_pthread_attr_getscope(const pthread_attr_t *attr, int *contentionscope)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_getstackaddr=_pthread_attr_getstackaddr
|
||||
__weak_reference(_pthread_attr_getstackaddr, pthread_attr_getstackaddr);
|
||||
|
||||
int
|
||||
_pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_getstacksize=_pthread_attr_getstacksize
|
||||
__weak_reference(_pthread_attr_getstacksize, pthread_attr_getstacksize);
|
||||
|
||||
int
|
||||
_pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize)
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_init=_pthread_attr_init
|
||||
__weak_reference(_pthread_attr_init, pthread_attr_init);
|
||||
|
||||
int
|
||||
_pthread_attr_init(pthread_attr_t *attr)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_setcreatesuspend_np=_pthread_attr_setcreatesuspend_np
|
||||
__weak_reference(_pthread_attr_setcreatesuspend_np, pthread_attr_setcreatesuspend_np);
|
||||
|
||||
int
|
||||
_pthread_attr_setcreatesuspend_np(pthread_attr_t *attr)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_setdetachstate=_pthread_attr_setdetachstate
|
||||
__weak_reference(_pthread_attr_setdetachstate, pthread_attr_setdetachstate);
|
||||
|
||||
int
|
||||
_pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_setinheritsched=_pthread_attr_setinheritsched
|
||||
__weak_reference(_pthread_attr_setinheritsched, pthread_attr_setinheritsched);
|
||||
|
||||
int
|
||||
_pthread_attr_setinheritsched(pthread_attr_t *attr, int sched_inherit)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_setprio=_pthread_attr_setprio
|
||||
__weak_reference(_pthread_attr_setprio, pthread_attr_setprio);
|
||||
|
||||
int
|
||||
_pthread_attr_setprio(pthread_attr_t *attr, int priority)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_setschedparam=_pthread_attr_setschedparam
|
||||
__weak_reference(_pthread_attr_setschedparam, pthread_attr_setschedparam);
|
||||
|
||||
int
|
||||
_pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_setschedpolicy=_pthread_attr_setschedpolicy
|
||||
__weak_reference(_pthread_attr_setschedpolicy, pthread_attr_setschedpolicy);
|
||||
|
||||
int
|
||||
_pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_setscope=_pthread_attr_setscope
|
||||
__weak_reference(_pthread_attr_setscope, pthread_attr_setscope);
|
||||
|
||||
int
|
||||
_pthread_attr_setscope(pthread_attr_t *attr, int contentionscope)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_setstackaddr=_pthread_attr_setstackaddr
|
||||
__weak_reference(_pthread_attr_setstackaddr, pthread_attr_setstackaddr);
|
||||
|
||||
int
|
||||
_pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_attr_setstacksize=_pthread_attr_setstacksize
|
||||
__weak_reference(_pthread_attr_setstacksize, pthread_attr_setstacksize);
|
||||
|
||||
int
|
||||
_pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak bind=_bind
|
||||
__weak_reference(_bind, bind);
|
||||
|
||||
int
|
||||
_bind(int fd, const struct sockaddr * name, socklen_t namelen)
|
||||
|
@ -8,10 +8,10 @@
|
||||
|
||||
static void finish_cancellation(void *arg);
|
||||
|
||||
#pragma weak pthread_cancel=_pthread_cancel
|
||||
#pragma weak pthread_setcancelstate=_pthread_setcancelstate
|
||||
#pragma weak pthread_setcanceltype=_pthread_setcanceltype
|
||||
#pragma weak pthread_testcancel=_pthread_testcancel
|
||||
__weak_reference(_pthread_cancel, pthread_cancel);
|
||||
__weak_reference(_pthread_setcancelstate, pthread_setcancelstate);
|
||||
__weak_reference(_pthread_setcanceltype, pthread_setcanceltype);
|
||||
__weak_reference(_pthread_testcancel, pthread_testcancel);
|
||||
|
||||
int
|
||||
_pthread_cancel(pthread_t pthread)
|
||||
|
@ -37,8 +37,8 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_cleanup_push=_pthread_cleanup_push
|
||||
#pragma weak pthread_cleanup_pop=_pthread_cleanup_pop
|
||||
__weak_reference(_pthread_cleanup_push, pthread_cleanup_push);
|
||||
__weak_reference(_pthread_cleanup_pop, pthread_cleanup_pop);
|
||||
|
||||
void
|
||||
_pthread_cleanup_push(void (*routine) (void *), void *routine_arg)
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak close=__close
|
||||
__weak_reference(__close, close);
|
||||
|
||||
int
|
||||
_close(int fd)
|
||||
|
@ -44,12 +44,12 @@ static inline pthread_t cond_queue_deq(pthread_cond_t);
|
||||
static inline void cond_queue_remove(pthread_cond_t, pthread_t);
|
||||
static inline void cond_queue_enq(pthread_cond_t, pthread_t);
|
||||
|
||||
#pragma weak pthread_cond_init=_pthread_cond_init
|
||||
#pragma weak pthread_cond_destroy=_pthread_cond_destroy
|
||||
#pragma weak pthread_cond_wait=_pthread_cond_wait
|
||||
#pragma weak pthread_cond_timedwait=_pthread_cond_timedwait
|
||||
#pragma weak pthread_cond_signal=_pthread_cond_signal
|
||||
#pragma weak pthread_cond_broadcast=_pthread_cond_broadcast
|
||||
__weak_reference(_pthread_cond_init, pthread_cond_init);
|
||||
__weak_reference(_pthread_cond_destroy, pthread_cond_destroy);
|
||||
__weak_reference(_pthread_cond_wait, pthread_cond_wait);
|
||||
__weak_reference(_pthread_cond_timedwait, pthread_cond_timedwait);
|
||||
__weak_reference(_pthread_cond_signal, pthread_cond_signal);
|
||||
__weak_reference(_pthread_cond_broadcast, pthread_cond_broadcast);
|
||||
|
||||
|
||||
/* Reinitialize a condition variable to defaults. */
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_condattr_destroy=_pthread_condattr_destroy
|
||||
__weak_reference(_pthread_condattr_destroy, pthread_condattr_destroy);
|
||||
|
||||
int
|
||||
_pthread_condattr_destroy(pthread_condattr_t *attr)
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_condattr_init=_pthread_condattr_init
|
||||
__weak_reference(_pthread_condattr_init, pthread_condattr_init);
|
||||
|
||||
int
|
||||
_pthread_condattr_init(pthread_condattr_t *attr)
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak connect=_connect
|
||||
__weak_reference(_connect, connect);
|
||||
|
||||
int
|
||||
_connect(int fd, const struct sockaddr * name, socklen_t namelen)
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak creat=___creat
|
||||
__weak_reference(___creat, creat);
|
||||
|
||||
int
|
||||
___creat(const char *path, mode_t mode)
|
||||
|
@ -63,7 +63,7 @@ int _thread_CTX_JB_value = CTX_JB;
|
||||
int _thread_CTX_SJB_value = CTX_SJB;
|
||||
int _thread_CTX_UC_value = CTX_UC;
|
||||
|
||||
#pragma weak pthread_create=_pthread_create
|
||||
__weak_reference(_pthread_create, pthread_create);
|
||||
|
||||
int
|
||||
_pthread_create(pthread_t * thread, const pthread_attr_t * attr,
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_detach=_pthread_detach
|
||||
__weak_reference(_pthread_detach, pthread_detach);
|
||||
|
||||
int
|
||||
_pthread_detach(pthread_t pthread)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak dup=_dup
|
||||
__weak_reference(_dup, dup);
|
||||
|
||||
int
|
||||
_dup(int fd)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak dup2=_dup2
|
||||
__weak_reference(_dup2, dup2);
|
||||
|
||||
int
|
||||
_dup2(int fd, int newfd)
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_equal=_pthread_equal
|
||||
__weak_reference(_pthread_equal, pthread_equal);
|
||||
|
||||
int
|
||||
_pthread_equal(pthread_t t1, pthread_t t2)
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak execve=_execve
|
||||
__weak_reference(_execve, execve);
|
||||
|
||||
int
|
||||
_execve(const char *name, char *const * argv, char *const * envp)
|
||||
|
@ -43,7 +43,7 @@
|
||||
#define FLAGS_IN_SCHEDQ \
|
||||
(PTHREAD_FLAGS_IN_PRIOQ|PTHREAD_FLAGS_IN_WAITQ|PTHREAD_FLAGS_IN_WORKQ)
|
||||
|
||||
#pragma weak pthread_exit=_pthread_exit
|
||||
__weak_reference(_pthread_exit, pthread_exit);
|
||||
|
||||
void _exit(int status)
|
||||
{
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak fchflags=_fchflags
|
||||
__weak_reference(_fchflags, fchflags);
|
||||
int
|
||||
_fchflags(int fd, u_long flags)
|
||||
{
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak fchmod=_fchmod
|
||||
__weak_reference(_fchmod, fchmod);
|
||||
|
||||
int
|
||||
_fchmod(int fd, mode_t mode)
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak fchown=_fchown
|
||||
__weak_reference(_fchown, fchown);
|
||||
|
||||
int
|
||||
_fchown(int fd, uid_t owner, gid_t group)
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak fcntl=__fcntl
|
||||
__weak_reference(__fcntl, fcntl);
|
||||
|
||||
int
|
||||
_fcntl(int fd, int cmd,...)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak flock=_flock
|
||||
__weak_reference(_flock, flock);
|
||||
|
||||
int
|
||||
_flock(int fd, int operation)
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak fork=_fork
|
||||
__weak_reference(_fork, fork);
|
||||
|
||||
pid_t
|
||||
_fork(void)
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak fpathconf=_fpathconf
|
||||
__weak_reference(_fpathconf, fpathconf);
|
||||
|
||||
long
|
||||
_fpathconf(int fd, int name)
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak fstat=_fstat
|
||||
__weak_reference(_fstat, fstat);
|
||||
|
||||
int
|
||||
_fstat(int fd, struct stat * buf)
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak fstatfs=_fstatfs
|
||||
__weak_reference(_fstatfs, fstatfs);
|
||||
|
||||
int
|
||||
_fstatfs(int fd, struct statfs * buf)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak fsync=__fsync
|
||||
__weak_reference(__fsync, fsync);
|
||||
|
||||
int
|
||||
_fsync(int fd)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak getdirentries=_getdirentries
|
||||
__weak_reference(_getdirentries, getdirentries);
|
||||
|
||||
int
|
||||
_getdirentries(int fd, char *buf, int nbytes, long *basep)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak getpeername=_getpeername
|
||||
__weak_reference(_getpeername, getpeername);
|
||||
|
||||
int
|
||||
_getpeername(int fd, struct sockaddr * peer, socklen_t *paddrlen)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_getprio=_pthread_getprio
|
||||
__weak_reference(_pthread_getprio, pthread_getprio);
|
||||
|
||||
int
|
||||
_pthread_getprio(pthread_t pthread)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_getschedparam=_pthread_getschedparam
|
||||
__weak_reference(_pthread_getschedparam, pthread_getschedparam);
|
||||
|
||||
int
|
||||
_pthread_getschedparam(pthread_t pthread, int *policy,
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak getsockname=_getsockname
|
||||
__weak_reference(_getsockname, getsockname);
|
||||
|
||||
int
|
||||
_getsockname(int s, struct sockaddr * name, socklen_t *namelen)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak getsockopt=_getsockopt
|
||||
__weak_reference(_getsockopt, getsockopt);
|
||||
|
||||
int
|
||||
_getsockopt(int fd, int level, int optname, void *optval, socklen_t
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
static void dump_thread(int fd, pthread_t pthread, int long_version);
|
||||
|
||||
#pragma weak pthread_set_name_np=_pthread_set_name_np
|
||||
__weak_reference(_pthread_set_name_np, pthread_set_name_np);
|
||||
|
||||
struct s_thread_info {
|
||||
enum pthread_state state;
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak ioctl=_ioctl
|
||||
__weak_reference(_ioctl, ioctl);
|
||||
|
||||
int
|
||||
_ioctl(int fd, unsigned long request,...)
|
||||
|
@ -42,9 +42,9 @@
|
||||
/* Prototypes: */
|
||||
static inline int check_stack(pthread_t thread, void *stackp);
|
||||
|
||||
#pragma weak siglongjmp=_thread_siglongjmp
|
||||
#pragma weak longjmp=_thread_longjmp
|
||||
#pragma weak _longjmp=__thread_longjmp
|
||||
__weak_reference(_thread_siglongjmp, siglongjmp);
|
||||
__weak_reference(_thread_longjmp, longjmp);
|
||||
__weak_reference(__thread_longjmp, _longjmp);
|
||||
|
||||
void
|
||||
_thread_siglongjmp(sigjmp_buf env, int savemask)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_join=_pthread_join
|
||||
__weak_reference(_pthread_join, pthread_join);
|
||||
|
||||
int
|
||||
_pthread_join(pthread_t pthread, void **thread_return)
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak keven=_kevent
|
||||
__weak_reference(_kevent, kevent);
|
||||
|
||||
int
|
||||
_kevent(int kq, const struct kevent *changelist, int nchanges,
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_kill=_pthread_kill
|
||||
__weak_reference(_pthread_kill, pthread_kill);
|
||||
|
||||
int
|
||||
_pthread_kill(pthread_t pthread, int sig)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak listen=_listen
|
||||
__weak_reference(_listen, listen);
|
||||
|
||||
int
|
||||
_listen(int fd, int backlog)
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_mutexattr_init=_pthread_mutexattr_init
|
||||
__weak_reference(_pthread_mutexattr_init, pthread_mutexattr_init);
|
||||
|
||||
int
|
||||
_pthread_mutexattr_init(pthread_mutexattr_t *attr)
|
||||
|
@ -35,10 +35,10 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_mutexattr_setkind_np=_pthread_mutexattr_setkind_np
|
||||
#pragma weak pthread_mutexattr_getkind_np=_pthread_mutexattr_getkind_np
|
||||
#pragma weak pthread_mutexattr_gettype=_pthread_mutexattr_gettype
|
||||
#pragma weak pthread_mutexattr_settype=_pthread_mutexattr_settype
|
||||
__weak_reference(_pthread_mutexattr_setkind_np, pthread_mutexattr_setkind_np);
|
||||
__weak_reference(_pthread_mutexattr_getkind_np, pthread_mutexattr_getkind_np);
|
||||
__weak_reference(_pthread_mutexattr_gettype, pthread_mutexattr_gettype);
|
||||
__weak_reference(_pthread_mutexattr_settype, pthread_mutexattr_settype);
|
||||
|
||||
int
|
||||
_pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind)
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak msync=__msync
|
||||
__weak_reference(__msync, msync);
|
||||
|
||||
int
|
||||
_msync(void *addr, size_t len, int flags)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_multi_np=_pthread_multi_np
|
||||
__weak_reference(_pthread_multi_np, pthread_multi_np);
|
||||
|
||||
int
|
||||
_pthread_multi_np()
|
||||
|
@ -79,13 +79,13 @@ static struct pthread_mutex_attr static_mutex_attr =
|
||||
static pthread_mutexattr_t static_mattr = &static_mutex_attr;
|
||||
|
||||
/* Single underscore versions provided for libc internal usage: */
|
||||
#pragma weak pthread_mutex_trylock=__pthread_mutex_trylock
|
||||
#pragma weak pthread_mutex_lock=__pthread_mutex_lock
|
||||
__weak_reference(__pthread_mutex_trylock, pthread_mutex_trylock);
|
||||
__weak_reference(__pthread_mutex_lock, pthread_mutex_lock);
|
||||
|
||||
/* No difference between libc and application usage of these: */
|
||||
#pragma weak pthread_mutex_init=_pthread_mutex_init
|
||||
#pragma weak pthread_mutex_destroy=_pthread_mutex_destroy
|
||||
#pragma weak pthread_mutex_unlock=_pthread_mutex_unlock
|
||||
__weak_reference(_pthread_mutex_init, pthread_mutex_init);
|
||||
__weak_reference(_pthread_mutex_destroy, pthread_mutex_destroy);
|
||||
__weak_reference(_pthread_mutex_unlock, pthread_mutex_unlock);
|
||||
|
||||
|
||||
/* Reinitialize a mutex to defaults. */
|
||||
|
@ -37,10 +37,10 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_mutexattr_getprioceiling=_pthread_mutexattr_getprioceiling
|
||||
#pragma weak pthread_mutexattr_setprioceiling=_pthread_mutexattr_setprioceiling
|
||||
#pragma weak pthread_mutex_getprioceiling=_pthread_mutex_getprioceiling
|
||||
#pragma weak pthread_mutex_setprioceiling=_pthread_mutex_setprioceiling
|
||||
__weak_reference(_pthread_mutexattr_getprioceiling, pthread_mutexattr_getprioceiling);
|
||||
__weak_reference(_pthread_mutexattr_setprioceiling, pthread_mutexattr_setprioceiling);
|
||||
__weak_reference(_pthread_mutex_getprioceiling, pthread_mutex_getprioceiling);
|
||||
__weak_reference(_pthread_mutex_setprioceiling, pthread_mutex_setprioceiling);
|
||||
|
||||
int
|
||||
_pthread_mutexattr_getprioceiling(pthread_mutexattr_t *mattr, int *prioceiling)
|
||||
|
@ -37,8 +37,8 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_mutexattr_getprotocol=_pthread_mutexattr_getprotocol
|
||||
#pragma weak pthread_mutexattr_setprotocol=_pthread_mutexattr_setprotocol
|
||||
__weak_reference(_pthread_mutexattr_getprotocol, pthread_mutexattr_getprotocol);
|
||||
__weak_reference(_pthread_mutexattr_setprotocol, pthread_mutexattr_setprotocol);
|
||||
|
||||
int
|
||||
_pthread_mutexattr_getprotocol(pthread_mutexattr_t *mattr, int *protocol)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_mutexattr_destroy=_pthread_mutexattr_destroy
|
||||
__weak_reference(_pthread_mutexattr_destroy, pthread_mutexattr_destroy);
|
||||
|
||||
int
|
||||
_pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak nanosleep=__nanosleep
|
||||
__weak_reference(__nanosleep, nanosleep);
|
||||
|
||||
int
|
||||
_nanosleep(const struct timespec * time_to_sleep,
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_once=_pthread_once
|
||||
__weak_reference(_pthread_once, pthread_once);
|
||||
|
||||
int
|
||||
_pthread_once(pthread_once_t * once_control, void (*init_routine) (void))
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak open=_open
|
||||
__weak_reference(_open, open);
|
||||
|
||||
int
|
||||
_open(const char *path, int flags,...)
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pause=_pause
|
||||
__weak_reference(_pause, pause);
|
||||
|
||||
int
|
||||
_pause(void)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pipe=_pipe
|
||||
__weak_reference(_pipe, pipe);
|
||||
|
||||
int
|
||||
_pipe(int fds[2])
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak poll=_poll
|
||||
__weak_reference(_poll, poll);
|
||||
|
||||
int
|
||||
_poll(struct pollfd *fds, unsigned int nfds, int timeout)
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak read=__read
|
||||
__weak_reference(__read, read);
|
||||
|
||||
ssize_t
|
||||
_read(int fd, void *buf, size_t nbytes)
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak readv=_readv
|
||||
__weak_reference(_readv, readv);
|
||||
|
||||
ssize_t
|
||||
_readv(int fd, const struct iovec * iov, int iovcnt)
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak recvfrom=_recvfrom
|
||||
__weak_reference(_recvfrom, recvfrom);
|
||||
|
||||
ssize_t
|
||||
_recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr * from,
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak recvmsg=_recvmsg
|
||||
__weak_reference(_recvmsg, recvmsg);
|
||||
|
||||
ssize_t
|
||||
_recvmsg(int fd, struct msghdr *msg, int flags)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_resume_np=_pthread_resume_np
|
||||
__weak_reference(_pthread_resume_np, pthread_resume_np);
|
||||
|
||||
/* Resume a thread: */
|
||||
int
|
||||
|
@ -36,13 +36,13 @@
|
||||
/* maximum number of times a read lock may be obtained */
|
||||
#define MAX_READ_LOCKS (INT_MAX - 1)
|
||||
|
||||
#pragma weak pthread_rwlock_destroy=_pthread_rwlock_destroy
|
||||
#pragma weak pthread_rwlock_init=_pthread_rwlock_init
|
||||
#pragma weak pthread_rwlock_rdlock=_pthread_rwlock_rdlock
|
||||
#pragma weak pthread_rwlock_tryrdlock=_pthread_rwlock_tryrdlock
|
||||
#pragma weak pthread_rwlock_trywrlock=_pthread_rwlock_trywrlock
|
||||
#pragma weak pthread_rwlock_unlock=_pthread_rwlock_unlock
|
||||
#pragma weak pthread_rwlock_wrlock=_pthread_rwlock_wrlock
|
||||
__weak_reference(_pthread_rwlock_destroy, pthread_rwlock_destroy);
|
||||
__weak_reference(_pthread_rwlock_init, pthread_rwlock_init);
|
||||
__weak_reference(_pthread_rwlock_rdlock, pthread_rwlock_rdlock);
|
||||
__weak_reference(_pthread_rwlock_tryrdlock, pthread_rwlock_tryrdlock);
|
||||
__weak_reference(_pthread_rwlock_trywrlock, pthread_rwlock_trywrlock);
|
||||
__weak_reference(_pthread_rwlock_unlock, pthread_rwlock_unlock);
|
||||
__weak_reference(_pthread_rwlock_wrlock, pthread_rwlock_wrlock);
|
||||
|
||||
static int init_static (pthread_rwlock_t *rwlock);
|
||||
|
||||
|
@ -32,10 +32,10 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_rwlockattr_destroy=_pthread_rwlockattr_destroy
|
||||
#pragma weak pthread_rwlockattr_getpshared=_pthread_rwlockattr_getpshared
|
||||
#pragma weak pthread_rwlockattr_init=_pthread_rwlockattr_init
|
||||
#pragma weak pthread_rwlockattr_setpshared=_pthread_rwlockattr_setpshared
|
||||
__weak_reference(_pthread_rwlockattr_destroy, pthread_rwlockattr_destroy);
|
||||
__weak_reference(_pthread_rwlockattr_getpshared, pthread_rwlockattr_getpshared);
|
||||
__weak_reference(_pthread_rwlockattr_init, pthread_rwlockattr_init);
|
||||
__weak_reference(_pthread_rwlockattr_setpshared, pthread_rwlockattr_setpshared);
|
||||
|
||||
int
|
||||
_pthread_rwlockattr_destroy(pthread_rwlockattr_t *rwlockattr)
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak select=_select
|
||||
__weak_reference(_select, select);
|
||||
|
||||
int
|
||||
_select(int numfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds,
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_self=_pthread_self
|
||||
__weak_reference(_pthread_self, pthread_self);
|
||||
|
||||
pthread_t
|
||||
_pthread_self(void)
|
||||
|
@ -42,15 +42,15 @@
|
||||
goto RETURN; \
|
||||
}
|
||||
|
||||
#pragma weak sem_init=_sem_init
|
||||
#pragma weak sem_destroy=_sem_destroy
|
||||
#pragma weak sem_open=_sem_open
|
||||
#pragma weak sem_close=_sem_close
|
||||
#pragma weak sem_unlink=_sem_unlink
|
||||
#pragma weak sem_wait=_sem_wait
|
||||
#pragma weak sem_trywait=_sem_trywait
|
||||
#pragma weak sem_post=_sem_post
|
||||
#pragma weak sem_getvalue=_sem_getvalue
|
||||
__weak_reference(_sem_init, sem_init);
|
||||
__weak_reference(_sem_destroy, sem_destroy);
|
||||
__weak_reference(_sem_open, sem_open);
|
||||
__weak_reference(_sem_close, sem_close);
|
||||
__weak_reference(_sem_unlink, sem_unlink);
|
||||
__weak_reference(_sem_wait, sem_wait);
|
||||
__weak_reference(_sem_trywait, sem_trywait);
|
||||
__weak_reference(_sem_post, sem_post);
|
||||
__weak_reference(_sem_getvalue, sem_getvalue);
|
||||
|
||||
|
||||
int
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak sendfile=_sendfile
|
||||
__weak_reference(_sendfile, sendfile);
|
||||
|
||||
int
|
||||
_sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr,
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak sendmsg=_sendmsg
|
||||
__weak_reference(_sendmsg, sendmsg);
|
||||
|
||||
ssize_t
|
||||
_sendmsg(int fd, const struct msghdr *msg, int flags)
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak sendto=_sendto
|
||||
__weak_reference(_sendto, sendto);
|
||||
|
||||
ssize_t
|
||||
_sendto(int fd, const void *msg, size_t len, int flags, const struct
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_setprio=_pthread_setprio
|
||||
__weak_reference(_pthread_setprio, pthread_setprio);
|
||||
|
||||
int
|
||||
_pthread_setprio(pthread_t pthread, int prio)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_setschedparam=_pthread_setschedparam
|
||||
__weak_reference(_pthread_setschedparam, pthread_setschedparam);
|
||||
|
||||
int
|
||||
_pthread_setschedparam(pthread_t pthread, int policy,
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak setsockopt=_setsockopt
|
||||
__weak_reference(_setsockopt, setsockopt);
|
||||
|
||||
int
|
||||
_setsockopt(int fd, int level, int optname, const void *optval, socklen_t
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak shutdown=_shutdown
|
||||
__weak_reference(_shutdown, shutdown);
|
||||
|
||||
int
|
||||
_shutdown(int fd, int how)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak sigaction=_sigaction
|
||||
__weak_reference(_sigaction, sigaction);
|
||||
|
||||
int
|
||||
_sigaction(int sig, const struct sigaction * act, struct sigaction * oact)
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak pthread_sigmask=_pthread_sigmask
|
||||
__weak_reference(_pthread_sigmask, pthread_sigmask);
|
||||
|
||||
int
|
||||
_pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak sigpending=_sigpending
|
||||
__weak_reference(_sigpending, sigpending);
|
||||
|
||||
int
|
||||
_sigpending(sigset_t * set)
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak sigprocmask=_sigprocmask
|
||||
__weak_reference(_sigprocmask, sigprocmask);
|
||||
|
||||
int
|
||||
_sigprocmask(int how, const sigset_t *set, sigset_t *oset)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak sigsuspend=__sigsuspend
|
||||
__weak_reference(__sigsuspend, sigsuspend);
|
||||
|
||||
int
|
||||
_sigsuspend(const sigset_t * set)
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <pthread.h>
|
||||
#include "pthread_private.h"
|
||||
|
||||
#pragma weak sigwait=_sigwait
|
||||
__weak_reference(_sigwait, sigwait);
|
||||
|
||||
int
|
||||
_sigwait(const sigset_t *set, int *sig)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user