adjust for time_t 64
This commit is contained in:
parent
ac43585b6e
commit
6c20e81ce2
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pthread_cancelstub.c,v 1.22 2008/10/08 08:27:07 ad Exp $ */
|
||||
/* $NetBSD: pthread_cancelstub.c,v 1.23 2008/12/28 21:33:35 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: pthread_cancelstub.c,v 1.22 2008/10/08 08:27:07 ad Exp $");
|
||||
__RCSID("$NetBSD: pthread_cancelstub.c,v 1.23 2008/12/28 21:33:35 christos Exp $");
|
||||
|
||||
#ifndef lint
|
||||
|
||||
@ -67,6 +67,11 @@ __RCSID("$NetBSD: pthread_cancelstub.c,v 1.22 2008/10/08 08:27:07 ad Exp $");
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <compat/sys/mman.h>
|
||||
#include <compat/sys/poll.h>
|
||||
#include <compat/sys/select.h>
|
||||
#include <compat/sys/wait.h>
|
||||
#include <compat/include/mqueue.h>
|
||||
#include <compat/include/signal.h>
|
||||
|
||||
#include "pthread.h"
|
||||
#include "pthread_int.h"
|
||||
@ -74,7 +79,9 @@ __RCSID("$NetBSD: pthread_cancelstub.c,v 1.22 2008/10/08 08:27:07 ad Exp $");
|
||||
int pthread__cancel_stub_binder;
|
||||
|
||||
int _sys_accept(int, struct sockaddr *, socklen_t *);
|
||||
int _sys_aio_suspend(const struct aiocb * const [], int,
|
||||
int _sys___aio_suspend50(const struct aiocb * const [], int,
|
||||
const struct timespec *);
|
||||
int __aio_suspend50(const struct aiocb * const [], int,
|
||||
const struct timespec *);
|
||||
int _sys_close(int);
|
||||
int _sys_connect(int, const struct sockaddr *, socklen_t);
|
||||
@ -84,29 +91,29 @@ int _sys_fsync(int);
|
||||
int _sys_fsync_range(int, int, off_t, off_t);
|
||||
int _sys_mq_send(mqd_t, const char *, size_t, unsigned);
|
||||
ssize_t _sys_mq_receive(mqd_t, char *, size_t, unsigned *);
|
||||
int _sys_mq_timedsend(mqd_t, const char *, size_t, unsigned,
|
||||
int _sys___mq_timedsend50(mqd_t, const char *, size_t, unsigned,
|
||||
const struct timespec *);
|
||||
ssize_t _sys_mq_timedreceive(mqd_t, char *, size_t, unsigned *,
|
||||
ssize_t _sys___mq_timedreceive50(mqd_t, char *, size_t, unsigned *,
|
||||
const struct timespec *);
|
||||
ssize_t _sys_msgrcv(int, void *, size_t, long, int);
|
||||
int _sys_msgsnd(int, const void *, size_t, int);
|
||||
int _sys___msync13(void *, size_t, int);
|
||||
int _sys_open(const char *, int, ...);
|
||||
int _sys_poll(struct pollfd *, nfds_t, int);
|
||||
int _sys_pollts(struct pollfd *, nfds_t, const struct timespec *,
|
||||
int _sys___pollts50(struct pollfd *, nfds_t, const struct timespec *,
|
||||
const sigset_t *);
|
||||
ssize_t _sys_pread(int, void *, size_t, off_t);
|
||||
int _sys_pselect(int, fd_set *, fd_set *, fd_set *,
|
||||
int _sys___pselect50(int, fd_set *, fd_set *, fd_set *,
|
||||
const struct timespec *, const sigset_t *);
|
||||
ssize_t _sys_pwrite(int, const void *, size_t, off_t);
|
||||
ssize_t _sys_read(int, void *, size_t);
|
||||
ssize_t _sys_readv(int, const struct iovec *, int);
|
||||
int _sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
|
||||
int _sys_wait4(pid_t, int *, int, struct rusage *);
|
||||
int _sys___select50(int, fd_set *, fd_set *, fd_set *, struct timeval *);
|
||||
int _sys___wait450(pid_t, int *, int, struct rusage *);
|
||||
ssize_t _sys_write(int, const void *, size_t);
|
||||
ssize_t _sys_writev(int, const struct iovec *, int);
|
||||
int _sys___sigsuspend14(const sigset_t *);
|
||||
int _sigtimedwait(const sigset_t * __restrict, siginfo_t * __restrict,
|
||||
int ____sigtimedwait50(const sigset_t * __restrict, siginfo_t * __restrict,
|
||||
const struct timespec * __restrict);
|
||||
int __sigsuspend14(const sigset_t *);
|
||||
|
||||
@ -131,7 +138,7 @@ accept(int s, struct sockaddr *addr, socklen_t *addrlen)
|
||||
}
|
||||
|
||||
int
|
||||
aio_suspend(const struct aiocb * const list[], int nent,
|
||||
__aio_suspend50(const struct aiocb * const list[], int nent,
|
||||
const struct timespec *timeout)
|
||||
{
|
||||
int retval;
|
||||
@ -139,7 +146,7 @@ aio_suspend(const struct aiocb * const list[], int nent,
|
||||
|
||||
self = pthread__self();
|
||||
TESTCANCEL(self);
|
||||
retval = _sys_aio_suspend(list, nent, timeout);
|
||||
retval = _sys___aio_suspend50(list, nent, timeout);
|
||||
TESTCANCEL(self);
|
||||
|
||||
return retval;
|
||||
@ -261,7 +268,7 @@ mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio)
|
||||
}
|
||||
|
||||
int
|
||||
mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
|
||||
__mq_timedsend50(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
|
||||
unsigned msg_prio, const struct timespec *abst)
|
||||
{
|
||||
int retval;
|
||||
@ -269,14 +276,14 @@ mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
|
||||
|
||||
self = pthread__self();
|
||||
TESTCANCEL(self);
|
||||
retval = _sys_mq_timedsend(mqdes, msg_ptr, msg_len, msg_prio, abst);
|
||||
retval = _sys___mq_timedsend50(mqdes, msg_ptr, msg_len, msg_prio, abst);
|
||||
TESTCANCEL(self);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
ssize_t
|
||||
mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio,
|
||||
__mq_timedreceive50(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio,
|
||||
const struct timespec *abst)
|
||||
{
|
||||
ssize_t retval;
|
||||
@ -284,7 +291,7 @@ mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio,
|
||||
|
||||
self = pthread__self();
|
||||
TESTCANCEL(self);
|
||||
retval = _sys_mq_timedreceive(mqdes, msg_ptr, msg_len, msg_prio, abst);
|
||||
retval = _sys___mq_timedreceive50(mqdes, msg_ptr, msg_len, msg_prio, abst);
|
||||
TESTCANCEL(self);
|
||||
|
||||
return retval;
|
||||
@ -364,7 +371,7 @@ poll(struct pollfd *fds, nfds_t nfds, int timeout)
|
||||
}
|
||||
|
||||
int
|
||||
pollts(struct pollfd *fds, nfds_t nfds, const struct timespec *ts,
|
||||
__pollts50(struct pollfd *fds, nfds_t nfds, const struct timespec *ts,
|
||||
const sigset_t *sigmask)
|
||||
{
|
||||
int retval;
|
||||
@ -372,7 +379,7 @@ pollts(struct pollfd *fds, nfds_t nfds, const struct timespec *ts,
|
||||
|
||||
self = pthread__self();
|
||||
TESTCANCEL(self);
|
||||
retval = _sys_pollts(fds, nfds, ts, sigmask);
|
||||
retval = _sys___pollts50(fds, nfds, ts, sigmask);
|
||||
TESTCANCEL(self);
|
||||
|
||||
return retval;
|
||||
@ -393,7 +400,7 @@ pread(int d, void *buf, size_t nbytes, off_t offset)
|
||||
}
|
||||
|
||||
int
|
||||
pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
||||
__pselect50(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
||||
const struct timespec *timeout, const sigset_t *sigmask)
|
||||
{
|
||||
int retval;
|
||||
@ -401,7 +408,7 @@ pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
||||
|
||||
self = pthread__self();
|
||||
TESTCANCEL(self);
|
||||
retval = _sys_pselect(nfds, readfds, writefds, exceptfds, timeout,
|
||||
retval = _sys___pselect50(nfds, readfds, writefds, exceptfds, timeout,
|
||||
sigmask);
|
||||
TESTCANCEL(self);
|
||||
|
||||
@ -455,7 +462,7 @@ readv(int d, const struct iovec *iov, int iovcnt)
|
||||
}
|
||||
|
||||
int
|
||||
select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
||||
__select50(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
||||
struct timeval *timeout)
|
||||
{
|
||||
int retval;
|
||||
@ -463,21 +470,21 @@ select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
||||
|
||||
self = pthread__self();
|
||||
TESTCANCEL(self);
|
||||
retval = _sys_select(nfds, readfds, writefds, exceptfds, timeout);
|
||||
retval = _sys___select50(nfds, readfds, writefds, exceptfds, timeout);
|
||||
TESTCANCEL(self);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
pid_t
|
||||
wait4(pid_t wpid, int *status, int options, struct rusage *rusage)
|
||||
__wait450(pid_t wpid, int *status, int options, struct rusage *rusage)
|
||||
{
|
||||
pid_t retval;
|
||||
pthread_t self;
|
||||
|
||||
self = pthread__self();
|
||||
TESTCANCEL(self);
|
||||
retval = _sys_wait4(wpid, status, options, rusage);
|
||||
retval = _sys___wait450(wpid, status, options, rusage);
|
||||
TESTCANCEL(self);
|
||||
|
||||
return retval;
|
||||
@ -526,21 +533,20 @@ __sigsuspend14(const sigset_t *sigmask)
|
||||
}
|
||||
|
||||
int
|
||||
sigtimedwait(const sigset_t * __restrict set, siginfo_t * __restrict info,
|
||||
const struct timespec * __restrict timeout)
|
||||
__sigtimedwait50(const sigset_t * __restrict set, siginfo_t * __restrict info,
|
||||
const struct timespec * __restrict timeout)
|
||||
{
|
||||
pthread_t self;
|
||||
int retval;
|
||||
|
||||
self = pthread__self();
|
||||
TESTCANCEL(self);
|
||||
retval = _sigtimedwait(set, info, timeout);
|
||||
retval = ____sigtimedwait50(set, info, timeout);
|
||||
TESTCANCEL(self);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
__strong_alias(_aio_suspend, aio_suspend)
|
||||
__strong_alias(_close, close)
|
||||
__strong_alias(_fcntl, fcntl)
|
||||
__strong_alias(_fdatasync, fdatasync)
|
||||
@ -548,21 +554,15 @@ __strong_alias(_fsync, fsync)
|
||||
__weak_alias(fsync_range, _fsync_range)
|
||||
__strong_alias(_mq_send, mq_send)
|
||||
__strong_alias(_mq_receive, mq_receive)
|
||||
__strong_alias(_mq_timedsend, mq_timedsend)
|
||||
__strong_alias(_mq_timedreceive, mq_timedreceive)
|
||||
__strong_alias(_msgrcv, msgrcv)
|
||||
__strong_alias(_msgsnd, msgsnd)
|
||||
__strong_alias(___msync13, __msync13)
|
||||
__strong_alias(_open, open)
|
||||
__strong_alias(_poll, poll)
|
||||
__weak_alias(pollts, _pollts)
|
||||
__strong_alias(_pread, pread)
|
||||
__strong_alias(_pselect, pselect)
|
||||
__strong_alias(_pwrite, pwrite)
|
||||
__strong_alias(_read, read)
|
||||
__strong_alias(_readv, readv)
|
||||
__strong_alias(_select, select)
|
||||
__strong_alias(_wait4, wait4)
|
||||
__strong_alias(_write, write)
|
||||
__strong_alias(_writev, writev)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pthread_misc.c,v 1.10 2008/06/28 16:50:43 ad Exp $ */
|
||||
/* $NetBSD: pthread_misc.c,v 1.11 2008/12/28 21:33:35 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: pthread_misc.c,v 1.10 2008/06/28 16:50:43 ad Exp $");
|
||||
__RCSID("$NetBSD: pthread_misc.c,v 1.11 2008/12/28 21:33:35 christos Exp $");
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
@ -50,10 +50,10 @@ __RCSID("$NetBSD: pthread_misc.c,v 1.10 2008/06/28 16:50:43 ad Exp $");
|
||||
int pthread__sched_yield(void);
|
||||
|
||||
int _sys___sigprocmask14(int, const sigset_t *, sigset_t *);
|
||||
int _sys_nanosleep(const struct timespec *, struct timespec *);
|
||||
int _sys___nanosleep50(const struct timespec *, struct timespec *);
|
||||
int _sys_sched_yield(void);
|
||||
int __nanosleep50(const struct timespec *, struct timespec *);
|
||||
|
||||
__strong_alias(_nanosleep, nanosleep)
|
||||
__strong_alias(__libc_thr_sigsetmask,pthread_sigmask)
|
||||
__strong_alias(__sigprocmask14,pthread_sigmask)
|
||||
__strong_alias(__libc_thr_yield,pthread__sched_yield)
|
||||
@ -152,14 +152,14 @@ pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
|
||||
|
||||
#ifndef lint
|
||||
int
|
||||
nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
|
||||
__nanosleep50(const struct timespec *rqtp, struct timespec *rmtp)
|
||||
{
|
||||
|
||||
/*
|
||||
* For now, just nanosleep. In the future, maybe pass a ucontext_t
|
||||
* to _lwp_nanosleep() and allow it to recycle our kernel stack.
|
||||
*/
|
||||
return _sys_nanosleep(rqtp, rmtp);
|
||||
return _sys___nanosleep50(rqtp, rmtp);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user