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

Side by Side Diff: third_party/nss/mozilla/nsprpub/pr/src/md/windows/w95thred.c

Issue 1701001: Attach a "foreign" thread to NSPR as a "system" thread so that... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 8 months 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 | Annotate | Revision Log
OLDNEW
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK ***** 2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * 4 *
5 * The contents of this file are subject to the Mozilla Public License Version 5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with 6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at 7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/ 8 * http://www.mozilla.org/MPL/
9 * 9 *
10 * Software distributed under the License is distributed on an "AS IS" basis, 10 * Software distributed under the License is distributed on an "AS IS" basis,
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 PRThread* 303 PRThread*
304 _MD_CURRENT_THREAD(void) 304 _MD_CURRENT_THREAD(void)
305 { 305 {
306 PRThread *thread; 306 PRThread *thread;
307 307
308 thread = _MD_GET_ATTACHED_THREAD(); 308 thread = _MD_GET_ATTACHED_THREAD();
309 309
310 if (NULL == thread) { 310 if (NULL == thread) {
311 thread = _PRI_AttachThread( 311 thread = _PRI_AttachThread(
312 PR_USER_THREAD, PR_PRIORITY_NORMAL, NULL, 0); 312 PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, NULL, 0);
313 } 313 }
314 PR_ASSERT(thread != NULL); 314 PR_ASSERT(thread != NULL);
315 return thread; 315 return thread;
316 } 316 }
317 317
318 // The following code is from Chromium src/base/thread_local_storage_win.cc, 318 // The following code is from Chromium src/base/thread_local_storage_win.cc,
319 // r11329. 319 // r11329.
320 320
321 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 321 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
322 // 322 //
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 414
415 #else // _WIN64 415 #else // _WIN64
416 416
417 #pragma data_seg(".CRT$XLB") 417 #pragma data_seg(".CRT$XLB")
418 PIMAGE_TLS_CALLBACK p_thread_callback = PR_OnThreadExit; 418 PIMAGE_TLS_CALLBACK p_thread_callback = PR_OnThreadExit;
419 419
420 // Reset the default section. 420 // Reset the default section.
421 #pragma data_seg() 421 #pragma data_seg()
422 422
423 #endif // _WIN64 423 #endif // _WIN64
OLDNEW
« no previous file with comments | « third_party/nss/README.chromium ('k') | third_party/nss/patches/nspr-attach-as-system-thread.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698