summaryrefslogtreecommitdiff
path: root/hurd/hurd/fd.h
diff options
context:
space:
mode:
Diffstat (limited to 'hurd/hurd/fd.h')
-rw-r--r--hurd/hurd/fd.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/hurd/hurd/fd.h b/hurd/hurd/fd.h
index 5f3ee6a8c9..6a79738cb6 100644
--- a/hurd/hurd/fd.h
+++ b/hurd/hurd/fd.h
@@ -1,6 +1,5 @@
/* File descriptors.
- Copyright (C) 1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2006,2007
- Free Software Foundation, Inc.
+ Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -64,6 +63,7 @@ _hurd_fd_get (int fd)
{
struct hurd_fd *descriptor;
+ HURD_CRITICAL_BEGIN;
__mutex_lock (&_hurd_dtable_lock);
if (fd < 0 || fd >= _hurd_dtablesize)
descriptor = NULL;
@@ -86,6 +86,7 @@ _hurd_fd_get (int fd)
}
}
__mutex_unlock (&_hurd_dtable_lock);
+ HURD_CRITICAL_END;
return descriptor;
}
@@ -199,7 +200,8 @@ extern void _hurd_port2fd (struct hurd_fd *fd, io_t port, int flags);
/* Allocate a new file descriptor and install PORT in it (doing any
appropriate ctty magic); consumes a user reference on PORT. FLAGS are
- as for `open'; only O_IGNORE_CTTY is meaningful, but all are saved.
+ as for `open'; only O_IGNORE_CTTY and O_CLOEXEC are meaningful, but all are
+ saved.
If the descriptor table is full, set errno, and return -1.
If DEALLOC is nonzero, deallocate PORT first. */