diff options
author | Christopher Faylor <me@cgf.cx> | 2010-03-09 21:26:55 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2010-03-09 21:26:55 +0000 |
commit | bd3b3783f8d2b80eef694324c6d0c143613b05be (patch) | |
tree | 396c57c32ce8e1ad1cbedb9e9e4e467410cd2295 /winsup/cygwin/shared_info.h | |
parent | fab7d5988a0518e7c33a69799676453385c876f5 (diff) | |
download | cygnal-bd3b3783f8d2b80eef694324c6d0c143613b05be.tar.gz cygnal-bd3b3783f8d2b80eef694324c6d0c143613b05be.tar.bz2 cygnal-bd3b3783f8d2b80eef694324c6d0c143613b05be.zip |
* shared_info.h (open_shared): Create function wrapper for common use case.
(open_shared): Change fifth argument to a pointer rather than a reference.
* fhandler_console.cc (fhandler_console::get_tty_stuff): Eliminate use of dummy
variable and call open_shared with constant.
* fhandler_process.cc (format_process_mounts): Ditto.
* pinfo.cc (pinfo::init): Pass pointer to shloc.
* shared.cc (shared_mem_inited): New variable.
(open_shared): Crate function wrapper for common use case.
(open_shared): Accommodate change to fifth argument to a pointer.
(shared_info::initialize): Remove spinlock test. Simplify function. Move
get_session_parent_dir call back here.
(memory_init): Protect global shared settings with shared_mem_inited spinlock.
Move get_session_parent_dir call to shared_info::initialize.
Diffstat (limited to 'winsup/cygwin/shared_info.h')
-rw-r--r-- | winsup/cygwin/shared_info.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/winsup/cygwin/shared_info.h b/winsup/cygwin/shared_info.h index 1fcb8ff86..52e6ce3df 100644 --- a/winsup/cygwin/shared_info.h +++ b/winsup/cygwin/shared_info.h @@ -97,10 +97,12 @@ HANDLE get_shared_parent_dir (); HANDLE get_session_parent_dir (); char *__stdcall shared_name (char *, const char *, int); WCHAR *__stdcall shared_name (WCHAR *, const WCHAR *, int); -void *__stdcall open_shared (const WCHAR *name, int n, HANDLE &shared_h, - DWORD size, shared_locations&, - PSECURITY_ATTRIBUTES psa = &sec_all, - DWORD access = FILE_MAP_READ | FILE_MAP_WRITE); +void *__stdcall open_shared (const WCHAR *, int, HANDLE&, DWORD, + shared_locations, PSECURITY_ATTRIBUTES = &sec_all, + DWORD = FILE_MAP_READ | FILE_MAP_WRITE); +void *__stdcall open_shared (const WCHAR *, int, HANDLE&, DWORD, + shared_locations *, PSECURITY_ATTRIBUTES = &sec_all, + DWORD = FILE_MAP_READ | FILE_MAP_WRITE); extern void user_shared_create (bool reinit); extern void user_shared_initialize (); extern void init_installation_root (); |