OSDN Git Service

Merge branch 'binutils' into tmp
[pf3gnuchains/pf3gnuchains4x.git] / winsup / cygwin / shared_info.h
index 1fcb8ff..e6f9c83 100644 (file)
@@ -1,6 +1,7 @@
 /* shared_info.h: shared info for cygwin
 
-   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009 Red Hat, Inc.
+   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009,
+   2010, 2011 Red Hat, Inc.
 
 This file is part of Cygwin.
 
@@ -14,41 +15,37 @@ details. */
 #include "limits.h"
 #include "mount.h"
 
+#define CURR_USER_MAGIC 0x6467403bU
+
 class user_info
 {
+  void initialize ();
 public:
-  DWORD version;
+  LONG version;
   DWORD cb;
   bool warned_msdos;
+  bool warned_notty;
   mount_info mountinfo;
+  friend void dll_crt0_1 (void *);
+  static void create (bool);
 };
+
 /******** Shared Info ********/
 /* Data accessible to all tasks */
 
-#define SHARED_VERSION (unsigned)(cygwin_version.api_major << 8 | \
-                                 cygwin_version.api_minor)
-#define SHARED_VERSION_MAGIC CYGWIN_VERSION_MAGIC (SHARED_MAGIC, SHARED_VERSION)
 
-#define SHARED_INFO_CB 31136
+#define CURR_SHARED_MAGIC 0x8fe4d9eeU
 
-#define CURR_SHARED_MAGIC 0x18da899eU
-
-#define USER_VERSION   1       // increment when mount table changes and
-#define USER_VERSION_MAGIC CYGWIN_VERSION_MAGIC (USER_MAGIC, USER_VERSION)
-#define CURR_USER_MAGIC 0xb2232e71U
+#define USER_VERSION   1
 
 /* NOTE: Do not make gratuitous changes to the names or organization of the
    below class.  The layout is checksummed to determine compatibility between
    different cygwin versions. */
 class shared_info
 {
-  DWORD version;
+  LONG version;
   DWORD cb;
  public:
-  unsigned heap_chunk;
-  bool heap_slop_inited;
-  unsigned heap_slop;
-  DWORD sys_mount_table_counter;
   tty_list tty;
   LONG last_used_bindresvport;
   DWORD obcaseinsensitive;
@@ -57,7 +54,7 @@ class shared_info
   void initialize ();
   void init_obcaseinsensitive ();
   unsigned heap_chunk_size ();
-  unsigned heap_slop_size ();
+  static void create ();
 };
 
 extern shared_info *cygwin_shared;
@@ -69,8 +66,8 @@ enum shared_locations
 {
   SH_CYGWIN_SHARED,
   SH_USER_SHARED,
-  SH_SHARED_CONSOLE,
   SH_MYSELF,
+  SH_SHARED_CONSOLE,
   SH_TOTAL_SIZE,
   SH_JUSTCREATE,
   SH_JUSTOPEN
@@ -85,24 +82,17 @@ void __stdcall shared_destroy ();
             (((DWORD) ((p) + 1) + system_info.dwAllocationGranularity - 1) / \
              system_info.dwAllocationGranularity)))
 
-#ifdef _FHANDLER_H_
-struct console_state
-{
-  tty_min tty_min_state;
-  dev_console dev_state;
-};
-#endif
-
 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 ();
 extern WCHAR installation_root[PATH_MAX];
 extern UNICODE_STRING installation_key;