Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(822)

Side by Side Diff: Source/wtf/ThreadingWin.cpp

Issue 34273002: Remove UnusedParam.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/wtf/ThreadingPthreads.cpp ('k') | Source/wtf/UnusedParam.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 unsigned threadIdentifier = 0; 211 unsigned threadIdentifier = 0;
212 ThreadIdentifier threadID = 0; 212 ThreadIdentifier threadID = 0;
213 OwnPtr<ThreadFunctionInvocation> invocation = adoptPtr(new ThreadFunctionInv ocation(entryPoint, data)); 213 OwnPtr<ThreadFunctionInvocation> invocation = adoptPtr(new ThreadFunctionInv ocation(entryPoint, data));
214 HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(0, 0, wtfThrea dEntryPoint, invocation.get(), 0, &threadIdentifier)); 214 HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(0, 0, wtfThrea dEntryPoint, invocation.get(), 0, &threadIdentifier));
215 if (!threadHandle) { 215 if (!threadHandle) {
216 WTF_LOG_ERROR("Failed to create thread at entry point %p with data %p: % ld", entryPoint, data, errno); 216 WTF_LOG_ERROR("Failed to create thread at entry point %p with data %p: % ld", entryPoint, data, errno);
217 return 0; 217 return 0;
218 } 218 }
219 219
220 // The thread will take ownership of invocation. 220 // The thread will take ownership of invocation.
221 ThreadFunctionInvocation* leakedInvocation = invocation.leakPtr(); 221 ThreadFunctionInvocation* ALLOW_UNUSED leakedInvocation = invocation.leakPtr ();
222 UNUSED_PARAM(leakedInvocation);
223 222
224 threadID = static_cast<ThreadIdentifier>(threadIdentifier); 223 threadID = static_cast<ThreadIdentifier>(threadIdentifier);
225 storeThreadHandleByIdentifier(threadIdentifier, threadHandle); 224 storeThreadHandleByIdentifier(threadIdentifier, threadHandle);
226 225
227 return threadID; 226 return threadID;
228 } 227 }
229 228
230 int waitForThreadCompletion(ThreadIdentifier threadID) 229 int waitForThreadCompletion(ThreadIdentifier threadID)
231 { 230 {
232 ASSERT(threadID); 231 ASSERT(threadID);
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 // Time is too far in the future (and would overflow unsigned long) - wait f orever. 483 // Time is too far in the future (and would overflow unsigned long) - wait f orever.
485 if (absoluteTime - currentTime > static_cast<double>(INT_MAX) / 1000.0) 484 if (absoluteTime - currentTime > static_cast<double>(INT_MAX) / 1000.0)
486 return INFINITE; 485 return INFINITE;
487 486
488 return static_cast<DWORD>((absoluteTime - currentTime) * 1000.0); 487 return static_cast<DWORD>((absoluteTime - currentTime) * 1000.0);
489 } 488 }
490 489
491 } // namespace WTF 490 } // namespace WTF
492 491
493 #endif // OS(WIN) 492 #endif // OS(WIN)
OLDNEW
« no previous file with comments | « Source/wtf/ThreadingPthreads.cpp ('k') | Source/wtf/UnusedParam.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698