jdk/src/windows/native/sun/windows/awt_Toolkit.h
changeset 13678 5c8001201f98
parent 10689 080571e66cc6
child 23010 6dadb192ad81
equal deleted inserted replaced
13508:7c6aa31ff1b2 13678:5c8001201f98
   130     }
   130     }
   131 };
   131 };
   132 
   132 
   133 // Macros for using CriticalSection objects that help trace
   133 // Macros for using CriticalSection objects that help trace
   134 // lock/unlock actions
   134 // lock/unlock actions
       
   135 
       
   136 /* Use THIS_FILE when it is available. */
       
   137 #ifndef THIS_FILE
       
   138     #define THIS_FILE __FILE__
       
   139 #endif
       
   140 
   135 #define CRITICAL_SECTION_ENTER(cs) { \
   141 #define CRITICAL_SECTION_ENTER(cs) { \
   136     J2dTraceLn4(J2D_TRACE_VERBOSE2, \
   142     J2dTraceLn4(J2D_TRACE_VERBOSE2, \
   137                 "CS.Wait:  tid, cs, file, line = 0x%x, 0x%x, %s, %d", \
   143                 "CS.Wait:  tid, cs, file, line = 0x%x, 0x%x, %s, %d", \
   138                 GetCurrentThreadId(), &(cs), __FILE__, __LINE__); \
   144                 GetCurrentThreadId(), &(cs), THIS_FILE, __LINE__); \
   139     (cs).Enter(); \
   145     (cs).Enter(); \
   140     J2dTraceLn4(J2D_TRACE_VERBOSE2, \
   146     J2dTraceLn4(J2D_TRACE_VERBOSE2, \
   141                 "CS.Enter: tid, cs, file, line = 0x%x, 0x%x, %s, %d", \
   147                 "CS.Enter: tid, cs, file, line = 0x%x, 0x%x, %s, %d", \
   142                 GetCurrentThreadId(), &(cs), __FILE__, __LINE__); \
   148                 GetCurrentThreadId(), &(cs), THIS_FILE, __LINE__); \
   143 }
   149 }
   144 
   150 
   145 #define CRITICAL_SECTION_LEAVE(cs) { \
   151 #define CRITICAL_SECTION_LEAVE(cs) { \
   146     J2dTraceLn4(J2D_TRACE_VERBOSE2, \
   152     J2dTraceLn4(J2D_TRACE_VERBOSE2, \
   147                 "CS.Leave: tid, cs, file, line = 0x%x, 0x%x, %s, %d", \
   153                 "CS.Leave: tid, cs, file, line = 0x%x, 0x%x, %s, %d", \
   148                 GetCurrentThreadId(), &(cs), __FILE__, __LINE__); \
   154                 GetCurrentThreadId(), &(cs), THIS_FILE, __LINE__); \
   149     (cs).Leave(); \
   155     (cs).Leave(); \
   150     J2dTraceLn4(J2D_TRACE_VERBOSE2, \
   156     J2dTraceLn4(J2D_TRACE_VERBOSE2, \
   151                 "CS.Left:  tid, cs, file, line = 0x%x, 0x%x, %s, %d", \
   157                 "CS.Left:  tid, cs, file, line = 0x%x, 0x%x, %s, %d", \
   152                 GetCurrentThreadId(), &(cs), __FILE__, __LINE__); \
   158                 GetCurrentThreadId(), &(cs), THIS_FILE, __LINE__); \
   153 }
   159 }
   154 
   160 
   155 /************************************************************************
   161 /************************************************************************
   156  * AwtToolkit class
   162  * AwtToolkit class
   157  */
   163  */