1 /* shared_info.h: shared info for cygwin
3 Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009,
4 2010, 2011 Red Hat, Inc.
6 This file is part of Cygwin.
8 This software is a copyrighted work licensed under the terms of the
9 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
18 #define CURR_USER_MAGIC 0x6467403bU
29 friend void dll_crt0_1 (void *);
30 static void create (bool);
33 /******** Shared Info ********/
34 /* Data accessible to all tasks */
37 #define CURR_SHARED_MAGIC 0x8fe4d9eeU
39 #define USER_VERSION 1
41 /* NOTE: Do not make gratuitous changes to the names or organization of the
42 below class. The layout is checksummed to determine compatibility between
43 different cygwin versions. */
50 LONG last_used_bindresvport;
51 DWORD obcaseinsensitive;
55 void init_obcaseinsensitive ();
56 unsigned heap_chunk_size ();
57 static void create ();
60 extern shared_info *cygwin_shared;
61 extern user_info *user_shared;
62 #define mount_table (&(user_shared->mountinfo))
63 extern HANDLE cygwin_user_h;
77 void memory_init (bool) __attribute__ ((regparm(1)));
78 void __stdcall shared_destroy ();
80 #define shared_align_past(p) \
81 ((char *) (system_info.dwAllocationGranularity * \
82 (((DWORD) ((p) + 1) + system_info.dwAllocationGranularity - 1) / \
83 system_info.dwAllocationGranularity)))
85 HANDLE get_shared_parent_dir ();
86 HANDLE get_session_parent_dir ();
87 char *__stdcall shared_name (char *, const char *, int);
88 WCHAR *__stdcall shared_name (WCHAR *, const WCHAR *, int);
89 void *__stdcall open_shared (const WCHAR *, int, HANDLE&, DWORD,
90 shared_locations, PSECURITY_ATTRIBUTES = &sec_all,
91 DWORD = FILE_MAP_READ | FILE_MAP_WRITE);
92 void *__stdcall open_shared (const WCHAR *, int, HANDLE&, DWORD,
93 shared_locations *, PSECURITY_ATTRIBUTES = &sec_all,
94 DWORD = FILE_MAP_READ | FILE_MAP_WRITE);
95 extern void user_shared_create (bool reinit);
96 extern void init_installation_root ();
97 extern WCHAR installation_root[PATH_MAX];
98 extern UNICODE_STRING installation_key;