3 Copyright 1998, 1999, 2000, 2001 Red Hat, Inc.
5 This software is a copyrighted work licensed under the terms of the
6 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
10 #define MALLOC_CHECK do {} while (0)
14 #define MALLOC_CHECK ({\
15 debug_printf ("checking malloc pool");\
21 DWORD __stdcall WFSO (HANDLE, DWORD) __attribute__ ((regparm(2)));
22 DWORD __stdcall WFMO (DWORD, CONST HANDLE *, BOOL, DWORD) __attribute__ ((regparm(3)));
25 #define WaitForSingleObject WFSO
26 #define WaitForMultipleObject WFMO
28 #if !defined(_DEBUG_H_)
31 void threadname_init ();
32 HANDLE __stdcall makethread (LPTHREAD_START_ROUTINE, LPVOID, DWORD, const char *) __attribute__ ((regparm(3)));
33 const char * __stdcall threadname (DWORD, int lockit = TRUE) __attribute__ ((regparm(2)));
34 void __stdcall regthread (const char *, DWORD) __attribute__ ((regparm(1)));
35 int __stdcall iscygthread ();
39 # define ForceCloseHandle CloseHandle
40 # define ForceCloseHandle1(h, n) CloseHandle (h)
41 # define ForceCloseHandle2(h, n) CloseHandle (h)
42 # define ProtectHandle(h) do {} while (0)
43 # define ProtectHandle1(h,n) do {} while (0)
44 # define ProtectHandle2(h,n) do {} while (0)
45 # define debug_init() do {} while (0)
46 # define setclexec_pid(h, nh, b) do {} while (0)
47 # define debug_fixup_after_fork() do {} while (0)
51 # ifdef NO_DEBUG_DEFINES
52 # undef NO_DEBUG_DEFINES
54 # define CloseHandle(h) \
55 close_handle (__PRETTY_FUNCTION__, __LINE__, (h), #h, FALSE)
56 # define ForceCloseHandle(h) \
57 close_handle (__PRETTY_FUNCTION__, __LINE__, (h), #h, TRUE)
58 # define ForceCloseHandle1(h,n) \
59 close_handle (__PRETTY_FUNCTION__, __LINE__, (h), #n, TRUE)
60 # define ForceCloseHandle2(h,n) \
61 close_handle (__PRETTY_FUNCTION__, __LINE__, (h), n, TRUE)
64 # define ProtectHandle(h) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), #h)
65 # define ProtectHandle1(h, n) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), #n)
66 # define ProtectHandle2(h, n) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), n)
69 void __stdcall add_handle (const char *, int, HANDLE, const char *)
70 __attribute__ ((regparm (3)));
71 BOOL __stdcall close_handle (const char *, int, HANDLE, const char *, BOOL)
72 __attribute__ ((regparm (3)));
73 void __stdcall cygbench (const char *s) __attribute__ ((regparm (1)));
74 extern "C" void console_printf (const char *fmt,...);
75 void setclexec_pid (HANDLE, HANDLE, bool);
76 void debug_fixup_after_fork ();