3 Copyright 1998, 1999, 2000 Cygnus Solutions.
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)
12 #define MALLOC_CHECK ({\
13 debug_printf ("checking malloc pool");\
19 DWORD __stdcall WFSO (HANDLE, DWORD);
20 DWORD __stdcall WFMO (DWORD, CONST HANDLE *, BOOL, DWORD);
23 #define WaitForSingleObject WFSO
24 #define WaitForMultipleObject WFMO
26 #if !defined(_DEBUG_H_)
29 void threadname_init ();
30 HANDLE __stdcall makethread (LPTHREAD_START_ROUTINE, LPVOID, DWORD, const char *);
31 const char * __stdcall threadname (DWORD, int lockit = TRUE);
32 void __stdcall regthread (const char *, DWORD);
33 int __stdcall iscygthread ();
36 # define ForceCloseHandle CloseHandle
37 # define ForceCloseHandle1(h, n) CloseHandle (h)
38 # define ForceCloseHandle2(h, n) CloseHandle (h)
39 # define ProtectHandle(h) do {} while (0)
40 # define ProtectHandle1(h,n) do {} while (0)
41 # define ProtectHandle2(h,n) do {} while (0)
42 # define debug_init() do {} while (0)
46 # ifdef NO_DEBUG_DEFINES
47 # undef NO_DEBUG_DEFINES
49 # define CloseHandle(h) \
50 close_handle (__PRETTY_FUNCTION__, __LINE__, (h), #h, FALSE)
51 # define ForceCloseHandle(h) \
52 close_handle (__PRETTY_FUNCTION__, __LINE__, (h), #h, TRUE)
53 # define ForceCloseHandle1(h,n) \
54 close_handle (__PRETTY_FUNCTION__, __LINE__, (h), #n, TRUE)
55 # define ForceCloseHandle2(h,n) \
56 close_handle (__PRETTY_FUNCTION__, __LINE__, (h), n, TRUE)
57 # define lock_pinfo_for_update(n) lpfu(__PRETTY_FUNCTION__, __LINE__, n)
60 # define ProtectHandle(h) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), #h)
61 # define ProtectHandle1(h,n) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), #n)
62 # define ProtectHandle2(h,n) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), n)
65 void __stdcall add_handle (const char *, int, HANDLE, const char *);
66 BOOL __stdcall close_handle (const char *, int, HANDLE, const char *, BOOL);
67 int __stdcall lpfu (const char *, int, DWORD timeout);