From 2a6fc028badee6ab9a4df2b1b395dbb701d965fb Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 28 Jan 2001 05:51:15 +0000 Subject: Throughout, change 'cygwin_shared.mount' to 'mount_table'. * child_info.h (child_info): Move shared_h, console_h to cygheap. Add mount_h. * cygheap.h (init_cygheap): Add shared_h, console_h. * cygheap.cc (init_cheap): Initialize heap at a fixed location after the shared memory regions. Initialize cygheap->user name here. * dcrt0.cc (dll_crt0_1): Call getpagesize () to initialize constants. Remove cygheap_init since it is done in shared_init now. (_dll_crt0): Initialize mount_h, remove shared_h and console_h initialization. * fhandler_console.cc (console_shared_h): Eliminate. (get_tty_stuff): Use cygheap->console_h rather than console_shared_h. * heap.cc (heap_init): Use page size constant calculated earlier in initialization. * shared.cc: Eliminate cygwin_shared_h. Add cygwin_mount_h. (mount_table_init): New function for initializing a user mount table. (open_shared_file_map): Use constant for shared memory region. Initialize cygheap and mount table here. (open_shared): Improve debugging output. (shared_info::initialize): Eliminate call to mount.init. (shared_terminate): Use cygheap->shared_h. Close cygwin_mount_h. (open_shared_file_map): Eliminate. * shared_info.h (mount_info): Add a version field. (shared_align_past): New macro for calculating location for shared memory regions. * sigproc.cc (init_child_info): Eliminate shared_h, console_h. * spawn.cc (spawn_guts): Pass on cygwin_mount_h iff not a different user. * syscalls.cc (system_info): New global holding system memory defaults. (getpagesize): Use system_info. * uinfo.cc (internal_getlogin): Only fill in user name if nonexistent. * winsup.h: Declare system_info. * passwd.cc (read_etc_passwd): Use cygheap->user.name () rather than retrieving the name again. --- winsup/cygwin/dcrt0.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'winsup/cygwin/dcrt0.cc') diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 368cc5eb1..52605f0b7 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -632,9 +632,7 @@ dll_crt0_1 () /* FIXME: Verify forked children get their exception handler set up ok. */ exception_list cygwin_except_entry; - /* Initialize SIGSEGV handling, etc... Because the exception handler - references data in the shared area, this must be done after - shared_init. */ + /* Initialize SIGSEGV handling, etc. */ init_exceptions (&cygwin_except_entry); do_global_ctors (&__CTOR_LIST__, 1); @@ -656,6 +654,7 @@ dll_crt0_1 () threadname_init (); debug_init (); + (void) getpagesize (); /* initialize page size constant */ regthread ("main", GetCurrentThreadId ()); mainthread.init ("mainthread"); // For use in determining if signals @@ -735,9 +734,6 @@ dll_crt0_1 () /* Initialize events. */ events_init (); - if (!child_proc_info) - cygheap_init (); - cygcwd.init (); cygbench ("pre-forkee"); @@ -918,9 +914,8 @@ _dll_crt0 () case PROC_EXEC: { child_proc_info = fork_info; + cygwin_mount_h = child_proc_info->mount_h; mypid = child_proc_info->cygpid; - cygwin_shared_h = child_proc_info->shared_h; - console_shared_h = child_proc_info->console_h; break; } default: -- cgit v1.2.3