aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/winsup.h
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-09-23 04:02:07 +0000
committerChristopher Faylor <me@cgf.cx>2003-09-23 04:02:07 +0000
commit3400b4fc441b639c751592a9d40775f715fad998 (patch)
treefc1949dea9c8437ebf89f6168143cc7e88715b01 /winsup/cygwin/winsup.h
parentd92d731fa51ccf56bda4ff9010d271b62f774bec (diff)
downloadnewlib-3400b4fc441b639c751592a9d40775f715fad998.zip
newlib-3400b4fc441b639c751592a9d40775f715fad998.tar.gz
newlib-3400b4fc441b639c751592a9d40775f715fad998.tar.bz2
* dcrt0.cc (do_exit): Eliminate "C" linkage. Call events_terminate early.
(exit_states): Move out of source file into header file. * winsup.h: Move exit_states here. Remove "C" linkage from do_exit declaration. * debug.cc (lock_debug): Remove explicit (and incorrect) external for exit_state. * sigproc.cc (sig_dispatch_pending): Don't flush signals if exiting.
Diffstat (limited to 'winsup/cygwin/winsup.h')
-rw-r--r--winsup/cygwin/winsup.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
index 55c0fe8..369f3ac 100644
--- a/winsup/cygwin/winsup.h
+++ b/winsup/cygwin/winsup.h
@@ -162,7 +162,23 @@ extern "C" int dll_dllcrt0 (HMODULE, per_process *);
extern "C" int dll_noncygwin_dllcrt0 (HMODULE, per_process *);
/* exit the program */
-extern "C" void __stdcall do_exit (int) __attribute__ ((noreturn));
+
+enum exit_states
+ {
+ ES_NOT_EXITING = 0,
+ ES_EVENTS_TERMINATE,
+ ES_THREADTERM,
+ ES_SIGNAL,
+ ES_CLOSEALL,
+ ES_SIGPROCTERMINATE,
+ ES_TITLE,
+ ES_HUP_PGRP,
+ ES_HUP_SID,
+ ES_TTY_TERMINATE
+ };
+
+extern exit_states exit_state;
+void __stdcall do_exit (int) __attribute__ ((regparm (1), noreturn));
/* UID/GID */
void uinfo_init (void);