summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/debug.h
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-09-01 05:17:34 +0000
committerChristopher Faylor <me@cgf.cx>2001-09-01 05:17:34 +0000
commite62ac9e86925090d0727605b33a1628d01b86158 (patch)
treee93ee4d420d352cc36cf1a9fbd530cf7f500f8d3 /winsup/cygwin/debug.h
parenta26a4cdbe0572f4c83d91b7193d5c53828757125 (diff)
downloadcygnal-e62ac9e86925090d0727605b33a1628d01b86158.tar.gz
cygnal-e62ac9e86925090d0727605b33a1628d01b86158.tar.bz2
cygnal-e62ac9e86925090d0727605b33a1628d01b86158.zip
* debug.cc (mark_closed): Rename from debug_mark_closed and make static.
(setclexec_pid): New function for marking saved handle as close-on-exec. (delete_handle): New function. (debug_fixup_after_fork): New function. * debug.h: Declare new functions, remove obsolete ones. * fork.cc (debug_fixup_after_fork): Call to cleanup close-on-exec handles. * fhandler.cc (fhandler_disk_file::close): Minor reorg. (fhandler_base::set_inheritance): Set flag appropriately for debugging when close-on-exec so forked process can delete closed handles. * tty.h (open_output_mutex): Eliminate unneeded argument. (open_input_mutex): Ditto. * fhandler_tty.cc (fhandler_tty_slave::open): reflect open_*_mutex argument changes. * fhandler.h (fhandler_socket): Make saw_shutdown_* functions type bool. * tty.cc (tty::get_event): Eliminate unneeded argument. (tty::common_init): Reflect change to get_event. Events should always be inherited.
Diffstat (limited to 'winsup/cygwin/debug.h')
-rw-r--r--winsup/cygwin/debug.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/winsup/cygwin/debug.h b/winsup/cygwin/debug.h
index 015627f3b..3c0d20b7b 100644
--- a/winsup/cygwin/debug.h
+++ b/winsup/cygwin/debug.h
@@ -43,8 +43,8 @@ int __stdcall iscygthread ();
# define ProtectHandle1(h,n) do {} while (0)
# define ProtectHandle2(h,n) do {} while (0)
# define debug_init() do {} while (0)
-# define MarkCLosed(h) do {} while (0)
-# define debug_mark_closed(func, ln, h, name, force) (1)
+# define setclexec_pid(h, b) do {} while (0)
+# define debug_fixup_after_fork() do {} while (0)
#else
@@ -59,23 +59,22 @@ int __stdcall iscygthread ();
close_handle (__PRETTY_FUNCTION__, __LINE__, (h), #n, TRUE)
# define ForceCloseHandle2(h,n) \
close_handle (__PRETTY_FUNCTION__, __LINE__, (h), n, TRUE)
-# define MarkClosed(h) \
- debug_mark_closed (__PRETTY_FUNCTION__, __LINE__, (h), #h, TRUE)
-# define lock_pinfo_for_update(n) lpfu(__PRETTY_FUNCTION__, __LINE__, n)
# endif
# define ProtectHandle(h) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), #h)
-# define ProtectHandle1(h,n) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), #n)
-# define ProtectHandle2(h,n) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), n)
+# define ProtectHandle1(h, n) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), #n)
+# define ProtectHandle2(h, n) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), n)
void debug_init ();
-void __stdcall add_handle (const char *, int, HANDLE, const char *);
-BOOL __stdcall close_handle (const char *, int, HANDLE, const char *, BOOL);
-int __stdcall lpfu (const char *, int, DWORD timeout);
-void __stdcall cygbench (const char *s);
-extern int pinger;
+void __stdcall add_handle (const char *, int, HANDLE, const char *)
+ __attribute__ ((regparm (3)));
+BOOL __stdcall close_handle (const char *, int, HANDLE, const char *, BOOL)
+ __attribute__ ((regparm (3)));
+void __stdcall cygbench (const char *s) __attribute__ ((regparm (1)));
extern "C" void console_printf (const char *fmt,...);
-bool debug_mark_closed (const char *, int, HANDLE, const char *, BOOL);
+void setclexec_pid (HANDLE, bool);
+void debug_fixup_after_fork ();
+extern int pinger;
#endif /*DEBUGGING*/
#endif /*_DEBUG_H_*/