diff options
author | Christopher Faylor <me@cgf.cx> | 2013-12-01 21:52:48 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2013-12-01 21:52:48 +0400 |
commit | f456b9f6f8efcb1e7472d31860b5815ccd614aa4 (patch) | |
tree | c263f4fab9d502e46cea61f8254fbbc088a274e7 /winsup/cygwin/dtable.h | |
parent | 10a5939224465e3feb8e19208f187904000a0c38 (diff) |
* dtable.cc (dtable::find_unused_handle): Fix off-by-one error. Always exit
through the bottom.
(cygwin_attach_handle_to_fd): Make sure that fd tab is locked for the duration
of this function.
* dtable.h (dtable::lock): Make public.
(dtable::unlock): Ditto.
(dtable): Remove friends.
Diffstat (limited to 'winsup/cygwin/dtable.h')
-rw-r--r-- | winsup/cygwin/dtable.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/winsup/cygwin/dtable.h b/winsup/cygwin/dtable.h index f0e484c01..0ec7b3a75 100644 --- a/winsup/cygwin/dtable.h +++ b/winsup/cygwin/dtable.h @@ -34,8 +34,6 @@ class dtable static const int initial_archetype_size = 8; size_t first_fd_for_open; int cnt_need_fixup_before; - void lock () {lock_process::locker.acquire ();} - void unlock () {lock_process::locker.release ();} public: size_t size; @@ -87,15 +85,8 @@ public: void delete_archetype (fhandler_base *); void fixup_before_exec (DWORD win_proc_id); void fixup_before_fork (DWORD win_proc_id); - friend void dtable_init (); - friend void __stdcall close_all_files (bool); - friend int dup_finish (int, int, int); - friend class fhandler_base; - friend class cygheap_fdmanip; - friend class cygheap_fdget; - friend class cygheap_fdnew; - friend class cygheap_fdenum; - friend class lock_process; + void lock () {lock_process::locker.acquire ();} + void unlock () {lock_process::locker.release ();} }; fhandler_base *build_fh_dev (const device&, const char * = NULL); |