Changeset 45931 in webkit for trunk/JavaScriptCore/wtf/ThreadingWin.cpp
- Timestamp:
- Jul 15, 2009, 11:23:28 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/ThreadingWin.cpp
r43663 r45931 2 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2009 Google Inc. All rights reserved. 4 * Copyright (C) 2009 Torch Mobile, Inc. All rights reserved. 4 5 * 5 6 * Redistribution and use in source and binary forms, with or without … … 90 91 #include "ThreadSpecific.h" 91 92 #endif 93 #if !PLATFORM(WINCE) 92 94 #include <process.h> 95 #endif 96 #if HAVE(ERRNO_H) 97 #include <errno.h> 98 #else 99 #define NO_ERRNO 100 #endif 93 101 #include <windows.h> 94 102 #include <wtf/CurrentTime.h> … … 211 219 ThreadIdentifier threadID = 0; 212 220 ThreadFunctionInvocation* invocation = new ThreadFunctionInvocation(entryPoint, data); 221 #if PLATFORM(WINCE) 222 // This is safe on WINCE, since CRT is in the core and innately multithreaded. 223 // On desktop Windows, need to use _beginthreadex (not available on WinCE) if using any CRT functions 224 HANDLE threadHandle = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)wtfThreadEntryPoint, invocation, 0, (LPDWORD)&threadIdentifier); 225 #else 213 226 HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(0, 0, wtfThreadEntryPoint, invocation, 0, &threadIdentifier)); 227 #endif 214 228 if (!threadHandle) { 229 #if PLATFORM(WINCE) 230 LOG_ERROR("Failed to create thread at entry point %p with data %p: %ld", entryPoint, data, ::GetLastError()); 231 #elif defined(NO_ERRNO) 232 LOG_ERROR("Failed to create thread at entry point %p with data %p.", entryPoint, data); 233 #else 215 234 LOG_ERROR("Failed to create thread at entry point %p with data %p: %ld", entryPoint, data, errno); 235 #endif 216 236 return 0; 217 237 }
Note:
See TracChangeset
for help on using the changeset viewer.