Changeset 299
- Timestamp:
- 06/02/10 13:53:08 (2 years ago)
- Files:
-
- trunk/import/core/sys/windows/windows.d (modified) (2 diffs)
- trunk/src/core/runtime.d (modified) (6 diffs)
- trunk/src/core/thread.d (modified) (8 diffs)
- trunk/src/rt/lifetime.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/import/core/sys/windows/windows.d
r206 r299 52 52 53 53 alias uint DWORD; 54 alias ulong DWORD64; 54 55 alias int BOOL; 55 56 alias ubyte BYTE; … … 1176 1177 } 1177 1178 1179 enum ADDRESS_MODE 1180 { 1181 AddrMode1616, 1182 AddrMode1632, 1183 AddrModeReal, 1184 AddrModeFlat 1185 } 1186 1187 struct ADDRESS 1188 { 1189 DWORD Offset; 1190 WORD Segment; 1191 ADDRESS_MODE Mode; 1192 } 1193 1194 struct ADDRESS64 1195 { 1196 DWORD64 Offset; 1197 WORD Segment; 1198 ADDRESS_MODE Mode; 1199 } 1200 1201 struct KDHELP 1202 { 1203 DWORD Thread; 1204 DWORD ThCallbackStack; 1205 DWORD NextCallback; 1206 DWORD FramePointer; 1207 DWORD KiCallUserMode; 1208 DWORD KeUserCallbackDispatcher; 1209 DWORD SystemRangeStart; 1210 DWORD ThCallbackBStore; 1211 DWORD KiUserExceptionDispatcher; 1212 DWORD StackBase; 1213 DWORD StackLimit; 1214 DWORD[5] Reserved; 1215 } 1216 1217 struct KDHELP64 1218 { 1219 DWORD64 Thread; 1220 DWORD ThCallbackStack; 1221 DWORD ThCallbackBStore; 1222 DWORD NextCallback; 1223 DWORD FramePointer; 1224 DWORD64 KiCallUserMode; 1225 DWORD64 KeUserCallbackDispatcher; 1226 DWORD64 SystemRangeStart; 1227 DWORD64 KiUserExceptionDispatcher; 1228 DWORD64 StackBase; 1229 DWORD64 StackLimit; 1230 DWORD64[5] Reserved; 1231 } 1232 1233 struct STACKFRAME 1234 { 1235 ADDRESS AddrPC; 1236 ADDRESS AddrReturn; 1237 ADDRESS AddrFrame; 1238 ADDRESS AddrStack; 1239 PVOID FuncTableEntry; 1240 DWORD[4] Params; 1241 BOOL Far; 1242 BOOL Virtual; 1243 DWORD[3] Reserved; 1244 KDHELP KdHelp; 1245 ADDRESS AddrBStore; 1246 } 1247 1248 struct STACKFRAME64 1249 { 1250 ADDRESS64 AddrPC; 1251 ADDRESS64 AddrReturn; 1252 ADDRESS64 AddrFrame; 1253 ADDRESS64 AddrStack; 1254 ADDRESS64 AddrBStore; 1255 PVOID FuncTableEntry; 1256 DWORD64[4] Params; 1257 BOOL Far; 1258 BOOL Virtual; 1259 DWORD64[3] Reserved; 1260 KDHELP64 KdHelp; 1261 } 1262 1178 1263 enum 1179 1264 { trunk/src/core/runtime.d
r297 r299 23 23 24 24 extern (C) void rt_setCollectHandler( CollectHandler h ); 25 extern (C) CollectHandler rt_getCollectHandler(); 26 25 27 extern (C) void rt_setTraceHandler( TraceHandler h ); 26 28 extern (C) TraceHandler rt_getTraceHandler(); … … 121 123 * true if the runtime is halting. 122 124 */ 123 static bool isHalting()125 static @property bool isHalting() 124 126 { 125 127 return rt_isHalting(); … … 169 171 * h = The new trace handler. Set to null to use the default handler. 170 172 */ 171 static void traceHandler( TraceHandler h )173 static @property void traceHandler( TraceHandler h ) 172 174 { 173 175 rt_setTraceHandler( h ); … … 175 177 176 178 /** 177 * Return the current trace handler 178 */ 179 static TraceHandler traceHandler() 179 * Gets the current trace handler. 180 * 181 * Returns: 182 * The current trace handler or null if no trace handler is set. 183 */ 184 static @property TraceHandler traceHandler() 180 185 { 181 186 return rt_getTraceHandler(); … … 193 198 * h = The new collect handler. Set to null to use the default handler. 194 199 */ 195 static void collectHandler( CollectHandler h )200 static @property void collectHandler( CollectHandler h ) 196 201 { 197 202 rt_setCollectHandler( h ); 203 } 204 205 206 /** 207 * Gets the current collect handler. 208 * 209 * Returns: 210 * The current collect handler or null if no trace handler is set. 211 */ 212 static @property CollectHandler collectHandler() 213 { 214 return rt_getCollectHandler(); 198 215 } 199 216 … … 208 225 * h = The new unit tester. Set to null to use the default unit tester. 209 226 */ 210 static void moduleUnitTester( ModuleUnitTester h )227 static @property void moduleUnitTester( ModuleUnitTester h ) 211 228 { 212 229 sm_moduleUnitTester = h; 230 } 231 232 233 /** 234 * Gets the current module unit tester. 235 * 236 * Returns: 237 * The current module unit tester handler or null if no trace handler is 238 * set. 239 */ 240 static @property ModuleUnitTester moduleUnitTester() 241 { 242 return sm_moduleUnitTester; 213 243 } 214 244 trunk/src/core/thread.d
r284 r299 793 793 * The name of this thread. 794 794 */ 795 final string name()795 final @property string name() 796 796 { 797 797 synchronized( this ) … … 808 808 * val = The new name of this thread. 809 809 */ 810 final void name( string val )810 final @property void name( string val ) 811 811 { 812 812 synchronized( this ) … … 827 827 * true if this is a daemon thread. 828 828 */ 829 final bool isDaemon()829 final @property bool isDaemon() 830 830 { 831 831 synchronized( this ) … … 846 846 * val = The new daemon status for this thread. 847 847 */ 848 final void isDaemon( bool val )848 final @property void isDaemon( bool val ) 849 849 { 850 850 synchronized( this ) … … 861 861 * true if the thread is running, false if not. 862 862 */ 863 final bool isRunning()863 final @property bool isRunning() 864 864 { 865 865 if( m_addr == m_addr.init ) … … 913 913 * The scheduling priority of this thread. 914 914 */ 915 final int priority()915 final @property int priority() 916 916 { 917 917 version( Windows ) … … 937 937 * val = The new scheduling priority of this thread. 938 938 */ 939 final void priority( int val )939 final @property void priority( int val ) 940 940 { 941 941 version( Windows ) … … 2934 2934 * The state of this fiber as an enumerated value. 2935 2935 */ 2936 final State state()2936 final @property State state() 2937 2937 { 2938 2938 return m_state; trunk/src/rt/lifetime.d
r282 r299 942 942 * 943 943 */ 944 extern (C) void rt_setCollectHandler(CollectHandler h)944 extern (C) void rt_setCollectHandler(CollectHandler h) 945 945 { 946 946 collectHandler = h; 947 } 948 949 950 /** 951 * 952 */ 953 extern (C) CollectHandler rt_getCollectHandler() 954 { 955 return collectHandler; 947 956 } 948 957
