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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 * You should have received a copy of the GNU Lesser General Public | 93 * You should have received a copy of the GNU Lesser General Public |
94 * License along with this library in the file COPYING.LIB; | 94 * License along with this library in the file COPYING.LIB; |
95 * if not, write to the Free Software Foundation, Inc., | 95 * if not, write to the Free Software Foundation, Inc., |
96 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | 96 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
97 */ | 97 */ |
98 | 98 |
99 #include "wtf/Threading.h" | 99 #include "wtf/Threading.h" |
100 | 100 |
101 #if OS(WIN) | 101 #if OS(WIN) |
102 | 102 |
| 103 #include <errno.h> |
| 104 #include <process.h> |
| 105 #include <windows.h> |
103 #include "wtf/CurrentTime.h" | 106 #include "wtf/CurrentTime.h" |
104 #include "wtf/DateMath.h" | 107 #include "wtf/DateMath.h" |
105 #include "wtf/HashMap.h" | 108 #include "wtf/HashMap.h" |
106 #include "wtf/MathExtras.h" | 109 #include "wtf/MathExtras.h" |
107 #include "wtf/ThreadSpecific.h" | 110 #include "wtf/ThreadSpecific.h" |
108 #include "wtf/ThreadingPrimitives.h" | 111 #include "wtf/ThreadingPrimitives.h" |
109 #include "wtf/WTFThreadData.h" | 112 #include "wtf/WTFThreadData.h" |
110 #include "wtf/dtoa/double-conversion.h" | 113 #include "wtf/dtoa/double-conversion.h" |
111 #include <errno.h> | |
112 #include <process.h> | |
113 #include <windows.h> | |
114 | 114 |
115 namespace WTF { | 115 namespace WTF { |
116 | 116 |
117 // THREADNAME_INFO comes from | 117 // THREADNAME_INFO comes from |
118 // <http://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx>. | 118 // <http://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx>. |
119 #pragma pack(push, 8) | 119 #pragma pack(push, 8) |
120 typedef struct tagTHREADNAME_INFO { | 120 typedef struct tagTHREADNAME_INFO { |
121 DWORD dwType; // must be 0x1000 | 121 DWORD dwType; // must be 0x1000 |
122 LPCSTR szName; // pointer to name (in user addr space) | 122 LPCSTR szName; // pointer to name (in user addr space) |
123 DWORD dwThreadID; // thread ID (-1=caller thread) | 123 DWORD dwThreadID; // thread ID (-1=caller thread) |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 } | 407 } |
408 | 408 |
409 void willCreateThread() { | 409 void willCreateThread() { |
410 s_threadCreated = true; | 410 s_threadCreated = true; |
411 } | 411 } |
412 #endif | 412 #endif |
413 | 413 |
414 } // namespace WTF | 414 } // namespace WTF |
415 | 415 |
416 #endif // OS(WIN) | 416 #endif // OS(WIN) |
OLD | NEW |