summaryrefslogtreecommitdiff
path: root/lib/libpthread/uthread/uthread_close.c
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1999-01-17 23:57:29 +0000
committerDavid Leonard <d@cvs.openbsd.org>1999-01-17 23:57:29 +0000
commit5ca1f71120ac2bc81b65a6cef298606b92242903 (patch)
tree82d901bf8097936d39c68cdb89cc598d1e1fccd6 /lib/libpthread/uthread/uthread_close.c
parent209640f64878cc32de9cf45178c9a0e979525bdd (diff)
pthread_cancel() and cancellation points
Diffstat (limited to 'lib/libpthread/uthread/uthread_close.c')
-rw-r--r--lib/libpthread/uthread/uthread_close.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libpthread/uthread/uthread_close.c b/lib/libpthread/uthread/uthread_close.c
index 7d95fbb3196..bc94d162b2a 100644
--- a/lib/libpthread/uthread/uthread_close.c
+++ b/lib/libpthread/uthread/uthread_close.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: uthread_close.c,v 1.3 1999/01/06 05:29:22 d Exp $
+ * $OpenBSD: uthread_close.c,v 1.4 1999/01/17 23:57:27 d Exp $
*/
#include <stdlib.h>
#include <unistd.h>
@@ -46,6 +46,7 @@ close(int fd)
int ret;
struct stat sb;
+ _thread_enter_cancellation_point();
/* Lock the file descriptor while the file is closed: */
if ((ret = _FD_LOCK(fd, FD_RDWR, NULL)) == 0) {
/* Get file descriptor status. */
@@ -84,6 +85,7 @@ close(int fd)
free(_thread_fd_table[fd]);
_thread_fd_table[fd] = NULL;
}
+ _thread_leave_cancellation_point();
return (ret);
}
#endif