summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread/uthread_recvfrom.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-12-19 11:39:20 +0000
committerru <ru@FreeBSD.org>2002-12-19 11:39:20 +0000
commitd5c27df6a8d1490193d55f7d71e972285829a296 (patch)
treed7465a589c1cbf86ee2cc4472110d1c9f954464a /lib/libc_r/uthread/uthread_recvfrom.c
parent8d1bd259938ab546f0c3a53bfce447f7de286559 (diff)
downloadFreeBSD-src-d5c27df6a8d1490193d55f7d71e972285829a296.zip
FreeBSD-src-d5c27df6a8d1490193d55f7d71e972285829a296.tar.gz
Make accept(), connect(), recvfrom(), recvmsg(), sendmsg(),
and sendto() cancelation points, as required by POSIX.1-2001. Reviewed by: deischen
Diffstat (limited to 'lib/libc_r/uthread/uthread_recvfrom.c')
-rw-r--r--lib/libc_r/uthread/uthread_recvfrom.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_recvfrom.c b/lib/libc_r/uthread/uthread_recvfrom.c
index d6f8da1..e18d449 100644
--- a/lib/libc_r/uthread/uthread_recvfrom.c
+++ b/lib/libc_r/uthread/uthread_recvfrom.c
@@ -38,7 +38,7 @@
#include <pthread.h>
#include "pthread_private.h"
-__weak_reference(_recvfrom, recvfrom);
+__weak_reference(__recvfrom, recvfrom);
ssize_t
_recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr * from,
@@ -74,3 +74,16 @@ _recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr * from,
}
return (ret);
}
+
+ssize_t
+__recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr * from,
+ socklen_t *from_len)
+{
+ int ret;
+
+ _thread_enter_cancellation_point();
+ ret = _recvfrom(fd, buf, len, flags, from, from_len);
+ _thread_leave_cancellation_point();
+
+ return (ret);
+}
OpenPOWER on IntegriCloud