| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |