diff options
Diffstat (limited to 'lib/libc_r/uthread')
-rw-r--r-- | lib/libc_r/uthread/uthread_poll.c | 14 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_readv.c | 14 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_select.c | 15 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_wait4.c | 14 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_writev.c | 14 |
5 files changed, 66 insertions, 5 deletions
diff --git a/lib/libc_r/uthread/uthread_poll.c b/lib/libc_r/uthread/uthread_poll.c index e2a7cc0..62b2613 100644 --- a/lib/libc_r/uthread/uthread_poll.c +++ b/lib/libc_r/uthread/uthread_poll.c @@ -41,7 +41,7 @@ #include <pthread.h> #include "pthread_private.h" -__weak_reference(_poll, poll); +__weak_reference(__poll, poll); int _poll(struct pollfd *fds, unsigned int nfds, int timeout) @@ -97,3 +97,15 @@ _poll(struct pollfd *fds, unsigned int nfds, int timeout) return (ret); } + +int +__poll(struct pollfd *fds, unsigned int nfds, int timeout) +{ + int ret; + + _thread_enter_cancellation_point(); + ret = _poll(fds, nfds, timeout); + _thread_leave_cancellation_point(); + + return ret; +} diff --git a/lib/libc_r/uthread/uthread_readv.c b/lib/libc_r/uthread/uthread_readv.c index 2759819..0aa6c15 100644 --- a/lib/libc_r/uthread/uthread_readv.c +++ b/lib/libc_r/uthread/uthread_readv.c @@ -40,7 +40,7 @@ #include <pthread.h> #include "pthread_private.h" -__weak_reference(_readv, readv); +__weak_reference(__readv, readv); ssize_t _readv(int fd, const struct iovec * iov, int iovcnt) @@ -92,3 +92,15 @@ _readv(int fd, const struct iovec * iov, int iovcnt) } return (ret); } + +ssize_t +__readv(int fd, const struct iovec *iov, int iovcnt) +{ + ssize_t ret; + + _thread_enter_cancellation_point(); + ret = _readv(fd, iov, iovcnt); + _thread_leave_cancellation_point(); + + return ret; +} diff --git a/lib/libc_r/uthread/uthread_select.c b/lib/libc_r/uthread/uthread_select.c index 8d03bbd..a3a9a9d 100644 --- a/lib/libc_r/uthread/uthread_select.c +++ b/lib/libc_r/uthread/uthread_select.c @@ -43,7 +43,7 @@ #include <pthread.h> #include "pthread_private.h" -__weak_reference(_select, select); +__weak_reference(__select, select); int _select(int numfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, @@ -214,3 +214,16 @@ _select(int numfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, return (ret); } + +int +__select(int numfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, + struct timeval *timeout) +{ + int ret; + + _thread_enter_cancellation_point(); + ret = _select(numfds, readfds, writefds, exceptfds, timeout); + _thread_leave_cancellation_point(); + + return ret; +} diff --git a/lib/libc_r/uthread/uthread_wait4.c b/lib/libc_r/uthread/uthread_wait4.c index 6c4e068..05ed065 100644 --- a/lib/libc_r/uthread/uthread_wait4.c +++ b/lib/libc_r/uthread/uthread_wait4.c @@ -38,7 +38,7 @@ #include <pthread.h> #include "pthread_private.h" -__weak_reference(_wait4, wait4); +__weak_reference(__wait4, wait4); pid_t _wait4(pid_t pid, int *istat, int options, struct rusage * rusage) @@ -68,3 +68,15 @@ _wait4(pid_t pid, int *istat, int options, struct rusage * rusage) return (ret); } + +pid_t +__wait4(pid_t pid, int *istat, int options, struct rusage *rusage) +{ + pid_t ret; + + _thread_enter_cancellation_point(); + ret = _wait4(pid, istat, options, rusage); + _thread_leave_cancellation_point(); + + return ret; +} diff --git a/lib/libc_r/uthread/uthread_writev.c b/lib/libc_r/uthread/uthread_writev.c index c084cd0..ec77258 100644 --- a/lib/libc_r/uthread/uthread_writev.c +++ b/lib/libc_r/uthread/uthread_writev.c @@ -42,7 +42,7 @@ #include <pthread.h> #include "pthread_private.h" -__weak_reference(_writev, writev); +__weak_reference(__writev, writev); ssize_t _writev(int fd, const struct iovec * iov, int iovcnt) @@ -202,3 +202,15 @@ _writev(int fd, const struct iovec * iov, int iovcnt) return (ret); } + +ssize_t +__writev(int fd, const struct iovec *iov, int iovcnt) +{ + ssize_t ret; + + _thread_enter_cancellation_point(); + ret = _writev(fd, iov, iovcnt); + _thread_leave_cancellation_point(); + + return ret; +} |