diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2012-07-22 20:07:27 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2012-07-22 20:07:27 +0200 |
commit | 0c2c04cb66576e03b8699502a2413aba8b2307f1 (patch) | |
tree | 6b06b602c1f3b4dca013ac1ecc511b1179f0a561 /hurd/hurd | |
parent | 12f5d20d82e276507f79f42897f3d61882eedb47 (diff) | |
parent | 7caa779f2445149b4cd227233e63dcb2eb914776 (diff) |
Merge commit 'refs/top-bases/t/hurdsig-global-dispositions' into t/hurdsig-global-dispositions
Diffstat (limited to 'hurd/hurd')
-rw-r--r-- | hurd/hurd/fd.h | 8 |
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. */ |