summaryrefslogtreecommitdiff
path: root/lib/libpthread/uthread/uthread_getsockname.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/uthread/uthread_getsockname.c')
-rw-r--r--lib/libpthread/uthread/uthread_getsockname.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libpthread/uthread/uthread_getsockname.c b/lib/libpthread/uthread/uthread_getsockname.c
index 22ad8075c8e..2c634a69fbf 100644
--- a/lib/libpthread/uthread/uthread_getsockname.c
+++ b/lib/libpthread/uthread/uthread_getsockname.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_getsockname.c,v 1.5 2008/06/03 14:45:05 kurt Exp $ */
+/* $OpenBSD: uthread_getsockname.c,v 1.6 2009/12/06 17:54:59 kurt Exp $ */
/*
* Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
* All rights reserved.
@@ -49,14 +49,14 @@ getsockname(int fd, struct sockaddr * name, socklen_t *namelen)
if (ret == 0) {
entry = _thread_fd_table[fd];
- _SPINLOCK(&entry->lock);
+ _thread_kern_sig_defer();
if (entry->state == FD_ENTRY_OPEN) {
ret = _thread_sys_getsockname(fd, name, namelen);
} else {
ret = -1;
errno = EBADF;
}
- _SPINUNLOCK(&entry->lock);
+ _thread_kern_sig_undefer();
}
return ret;