summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include/sys
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-07-05 23:46:44 +0000
committerChristopher Faylor <me@cgf.cx>2000-07-05 23:46:44 +0000
commit737a86d32fdaed1b8e29486d793a85896a5e0b95 (patch)
treea205999bafd7339f538b4bfa6d66da7a50675c60 /winsup/cygwin/include/sys
parent4e734b208bd377dde6cfc95a342dbf8940a8919c (diff)
downloadcygnal-737a86d32fdaed1b8e29486d793a85896a5e0b95.tar.gz
cygnal-737a86d32fdaed1b8e29486d793a85896a5e0b95.tar.bz2
cygnal-737a86d32fdaed1b8e29486d793a85896a5e0b95.zip
* dcrt0.cc (__cygwin_user_data): Initialize.
(dll_crt0_1): Eliminate user_data initialization. (dll_crt0): Set up impure_ptr_ptr for older executables. (cygwin_dll_init): Eliminate user_data initializations. (__api_fatal): Don't check for user_data initialization. * dll_init.cc (struct dll): Store entire contents of per_process rather than just a pointer. (add): Ditto. (initOneDll): Don't check for user_data initialization. (DllList::recordDll): Store contents of per_process argument. (DllList::detachDll): Pass address of per_process field. (DllList::initAll): Ditto. (DllList::doGlobalDestructorsOfDlls): Ditto. (DllListIterator::operator *): Ditto. (dll_dllcrt0): Default to __cygwin_user_data if arg is NULL. * include/sys/cygwin.h: Reorganize per_process to eliminate obsolete fields and accomodate new way of initializing. * lib/_cygwin_crt0_common: Initialize _impure_ptr from __cygwin_user_data.impure_ptr.
Diffstat (limited to 'winsup/cygwin/include/sys')
-rw-r--r--winsup/cygwin/include/sys/cygwin.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h
index ff7821299..7ba5cda24 100644
--- a/winsup/cygwin/include/sys/cygwin.h
+++ b/winsup/cygwin/include/sys/cygwin.h
@@ -53,9 +53,8 @@ extern void cygwin_premain3 (int argc, char **argv);
SIZEOF_PER_PROCESS) to make sure you remember to make the adjustment.
*/
-class per_process
+struct per_process
{
- public:
char *initial_sp;
/* The offset of these 3 values can never change. */
@@ -96,19 +95,14 @@ class per_process
/* non-zero of ctors have been run. Inherited from parent. */
int run_ctors_p;
- /* These will be non-zero if the above (malloc,free,realloc) have been
- overridden. */
- /* FIXME: not currently used */
- int __imp_malloc;
- int __imp_free;
- int __imp_realloc;
+ DWORD unused[3];
/* Heap management. Inherited from parent. */
void *heapbase; /* bottom of the heap */
void *heapptr; /* current index into heap */
void *heaptop; /* current top of heap */
- HANDLE unused1; /* unused */
+ DWORD unused1; /* unused */
/* Non-zero means the task was forked. The value is the pid.
Inherited from parent. */
@@ -120,14 +114,13 @@ class per_process
DWORD api_minor; /* linked with */
/* For future expansion, so apps won't have to be relinked if we
add an item. */
-#ifdef _MT_SAFE
+ DWORD unused2[5];
+
ResourceLocks *resourcelocks;
MTinterface *threadinterface;
- void *internal_reserved[6];
-#else
- void *internal_reserved[8];
-#endif
+ struct _reent *impure_ptr;
};
+#define per_process_overwrite ((unsigned) &(((struct per_process *) NULL)->resourcelocks))
#endif /* __cplusplus */
#ifdef _PATH_PASSWD