summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/shared_info.h
diff options
context:
space:
mode:
authorPierre Humblet <phumblet@phumblet.no-ip.org>2003-09-25 02:29:05 +0000
committerPierre Humblet <phumblet@phumblet.no-ip.org>2003-09-25 02:29:05 +0000
commit138847683d28920eda599f2125c71cc5a1f7a874 (patch)
tree49a4c9cd9168abb65bb60427eae25a3dd6077b3e /winsup/cygwin/shared_info.h
parenta4e167fa277343ca039501010fdebe26d246fc22 (diff)
downloadcygnal-138847683d28920eda599f2125c71cc5a1f7a874.tar.gz
cygnal-138847683d28920eda599f2125c71cc5a1f7a874.tar.bz2
cygnal-138847683d28920eda599f2125c71cc5a1f7a874.zip
2003-09-24 Pierre Humblet <pierre.humblet@ieee.org>
* shared_info.h (class user_info): New. (cygwin_user_h): New. (user_shared): New. (enum shared_locations): Replace SH_MOUNT_TABLE by SH_USER_SHARED; (mount_table): Change from variable to macro. * shared.cc: Use sizeof(user_info) in "offsets". (user_shared_initialize): Add "reinit" argument to indicate need to reinitialize the mapping. Replace "mount_table" by "user_shared" throughout. Call user_shared->mountinfo.init and user_shared->delqueue.init. (shared_info::initialize): Do not call delqueue.init. (memory_init): Add argument to user_shared_initialize. * child_info.h (child_info::mount_h): Delete. (child_info::user_h): New. * sigpproc.cc (init_child_info): Use user_h instead of mount_h. * dcrt0.cc (_dll_crt0): Ditto. * fhandler_disk_file.cc (fhandler_disk_file::close): Use user_shared->delqueue instead of cygwin_shared->delqueue. * fhandler_virtual.cc (fhandler_virtual::close): Ditto. * syscalls.cc (close_all_files): Ditto. (unlink): Ditto. (seteuid32): Add argument to user_shared_initialize.
Diffstat (limited to 'winsup/cygwin/shared_info.h')
-rw-r--r--winsup/cygwin/shared_info.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/winsup/cygwin/shared_info.h b/winsup/cygwin/shared_info.h
index 4ae79ded9..02db4eb94 100644
--- a/winsup/cygwin/shared_info.h
+++ b/winsup/cygwin/shared_info.h
@@ -42,10 +42,9 @@ class mount_item
scheme should be satisfactory for a long while yet. */
#define MAX_MOUNTS 30
-#define MOUNT_VERSION 27 // increment when mount table changes and
-#define MOUNT_VERSION_MAGIC CYGWIN_VERSION_MAGIC (MOUNT_MAGIC, MOUNT_VERSION)
-#define CURR_MOUNT_MAGIC 0x6dd73a3fU
-#define MOUNT_INFO_CB 16488
+#define USER_VERSION 1 // increment when mount table changes and
+#define USER_VERSION_MAGIC CYGWIN_VERSION_MAGIC (MOUNT_MAGIC, USER_VERSION)
+#define CURR_MOUNT_MAGIC 0x4fe431cdU /* FIXME */
class reg_key;
struct device;
@@ -133,6 +132,14 @@ public:
void process_queue ();
};
+class user_info
+{
+public:
+ DWORD version;
+ DWORD cb;
+ delqueue_list delqueue;
+ mount_info mountinfo;
+};
/******** Shared Info ********/
/* Data accessible to all tasks */
@@ -162,13 +169,14 @@ class shared_info
};
extern shared_info *cygwin_shared;
-extern mount_info *mount_table;
-extern HANDLE cygwin_mount_h;
+extern user_info *user_shared;
+#define mount_table (&(user_shared->mountinfo))
+extern HANDLE cygwin_user_h;
enum shared_locations
{
SH_CYGWIN_SHARED,
- SH_MOUNT_TABLE,
+ SH_USER_SHARED,
SH_SHARED_CONSOLE,
SH_MYSELF,
SH_TOTAL_SIZE
@@ -193,5 +201,5 @@ struct console_state
char *__stdcall shared_name (char *, const char *, int);
void *__stdcall open_shared (const char *name, int n, HANDLE &shared_h, DWORD size,
shared_locations, PSECURITY_ATTRIBUTES psa = &sec_all);
-extern void user_shared_initialize ();
+extern void user_shared_initialize (bool reinit);