summaryrefslogtreecommitdiff
path: root/lib/libpthread/uthread/uthread_dup.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/uthread/uthread_dup.c')
-rw-r--r--lib/libpthread/uthread/uthread_dup.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/libpthread/uthread/uthread_dup.c b/lib/libpthread/uthread/uthread_dup.c
deleted file mode 100644
index af0fa71da6d..00000000000
--- a/lib/libpthread/uthread/uthread_dup.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* $OpenBSD: uthread_dup.c,v 1.7 2006/09/26 14:18:28 kurt Exp $ */
-/* PUBLIC DOMAIN <marc@snafu.org> */
-
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-dup(int fd)
-{
- int ret;
-
- ret = _FD_LOCK(fd, FD_RDWR, NULL);
- if (ret == 0) {
- ret = _thread_sys_dup(fd);
- if (ret != -1) {
- if (_thread_fd_table_init(ret, FD_INIT_DUP,
- _thread_fd_table[fd]->status_flags) == -1) {
- _thread_sys_close(ret);
- ret = -1;
- }
- }
- _FD_UNLOCK(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif