| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2  * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 
| 3  * Copyright (C) 2009 Google Inc. All rights reserved. | 3  * Copyright (C) 2009 Google Inc. All rights reserved. | 
| 4  * Copyright (C) 2009 Torch Mobile, Inc. All rights reserved. | 4  * Copyright (C) 2009 Torch Mobile, Inc. All rights reserved. | 
| 5  * | 5  * | 
| 6  * Redistribution and use in source and binary forms, with or without | 6  * Redistribution and use in source and binary forms, with or without | 
| 7  * modification, are permitted provided that the following conditions | 7  * modification, are permitted provided that the following conditions | 
| 8  * are met: | 8  * are met: | 
| 9  * | 9  * | 
| 10  * 1.  Redistributions of source code must retain the above copyright | 10  * 1.  Redistributions of source code must retain the above copyright | 
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 81  *      License along with this library in the file COPYING.LIB; | 81  *      License along with this library in the file COPYING.LIB; | 
| 82  *      if not, write to the Free Software Foundation, Inc., | 82  *      if not, write to the Free Software Foundation, Inc., | 
| 83  *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | 83  *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | 
| 84  */ | 84  */ | 
| 85 | 85 | 
| 86 #include "config.h" | 86 #include "config.h" | 
| 87 #include "Threading.h" | 87 #include "Threading.h" | 
| 88 | 88 | 
| 89 #if OS(WINDOWS) | 89 #if OS(WINDOWS) | 
| 90 | 90 | 
| 91 #include "DateMath.h" |  | 
| 92 #include "dtoa.h" |  | 
| 93 #include "dtoa/cached-powers.h" |  | 
| 94 |  | 
| 95 #include "MainThread.h" |  | 
| 96 #include "ThreadFunctionInvocation.h" |  | 
| 97 #include "ThreadSpecific.h" |  | 
| 98 #include <windows.h> |  | 
| 99 #include "wtf/CurrentTime.h" | 91 #include "wtf/CurrentTime.h" | 
|  | 92 #include "wtf/DateMath.h" | 
| 100 #include "wtf/HashMap.h" | 93 #include "wtf/HashMap.h" | 
|  | 94 #include "wtf/MainThread.h" | 
| 101 #include "wtf/MathExtras.h" | 95 #include "wtf/MathExtras.h" | 
| 102 #include "wtf/OwnPtr.h" | 96 #include "wtf/OwnPtr.h" | 
| 103 #include "wtf/PassOwnPtr.h" | 97 #include "wtf/PassOwnPtr.h" | 
| 104 #include "wtf/RandomNumberSeed.h" | 98 #include "wtf/RandomNumberSeed.h" | 
|  | 99 #include "wtf/ThreadFunctionInvocation.h" | 
|  | 100 #include "wtf/ThreadSpecific.h" | 
|  | 101 #include "wtf/ThreadingPrimitives.h" | 
| 105 #include "wtf/WTFThreadData.h" | 102 #include "wtf/WTFThreadData.h" | 
| 106 | 103 #include "wtf/dtoa.h" | 
|  | 104 #include "wtf/dtoa/cached-powers.h" | 
| 107 #include <errno.h> | 105 #include <errno.h> | 
| 108 #include <process.h> | 106 #include <process.h> | 
|  | 107 #include <windows.h> | 
| 109 | 108 | 
| 110 namespace WTF { | 109 namespace WTF { | 
| 111 | 110 | 
| 112 // MS_VC_EXCEPTION, THREADNAME_INFO, and setThreadNameInternal all come from <ht
     tp://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx>. | 111 // MS_VC_EXCEPTION, THREADNAME_INFO, and setThreadNameInternal all come from <ht
     tp://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx>. | 
| 113 static const DWORD MS_VC_EXCEPTION = 0x406D1388; | 112 static const DWORD MS_VC_EXCEPTION = 0x406D1388; | 
| 114 | 113 | 
| 115 #pragma pack(push, 8) | 114 #pragma pack(push, 8) | 
| 116 typedef struct tagTHREADNAME_INFO { | 115 typedef struct tagTHREADNAME_INFO { | 
| 117     DWORD dwType; // must be 0x1000 | 116     DWORD dwType; // must be 0x1000 | 
| 118     LPCSTR szName; // pointer to name (in user addr space) | 117     LPCSTR szName; // pointer to name (in user addr space) | 
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 486     // Time is too far in the future (and would overflow unsigned long) - wait f
     orever. | 485     // Time is too far in the future (and would overflow unsigned long) - wait f
     orever. | 
| 487     if (absoluteTime - currentTime > static_cast<double>(INT_MAX) / 1000.0) | 486     if (absoluteTime - currentTime > static_cast<double>(INT_MAX) / 1000.0) | 
| 488         return INFINITE; | 487         return INFINITE; | 
| 489 | 488 | 
| 490     return static_cast<DWORD>((absoluteTime - currentTime) * 1000.0); | 489     return static_cast<DWORD>((absoluteTime - currentTime) * 1000.0); | 
| 491 } | 490 } | 
| 492 | 491 | 
| 493 } // namespace WTF | 492 } // namespace WTF | 
| 494 | 493 | 
| 495 #endif // OS(WINDOWS) | 494 #endif // OS(WINDOWS) | 
| OLD | NEW | 
|---|