| 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 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 _PR_DEC_DEADNATIVE; | 1158 _PR_DEC_DEADNATIVE; |
| 1159 _PR_DEADQ_UNLOCK; | 1159 _PR_DEADQ_UNLOCK; |
| 1160 | 1160 |
| 1161 _PR_InitializeRecycledThread(thread); | 1161 _PR_InitializeRecycledThread(thread); |
| 1162 thread->startFunc = start; | 1162 thread->startFunc = start; |
| 1163 thread->arg = arg; | 1163 thread->arg = arg; |
| 1164 thread->flags = (flags | _PR_GLOBAL_SCOPE); | 1164 thread->flags = (flags | _PR_GLOBAL_SCOPE); |
| 1165 if (type == PR_SYSTEM_THREAD) | 1165 if (type == PR_SYSTEM_THREAD) |
| 1166 { | 1166 { |
| 1167 thread->flags |= _PR_SYSTEM; | 1167 thread->flags |= _PR_SYSTEM; |
| 1168 PR_AtomicIncrement(&_pr_systemActive); | 1168 PR_ATOMIC_INCREMENT(&_pr_systemActive); |
| 1169 } | 1169 } |
| 1170 else PR_AtomicIncrement(&_pr_userActive); | 1170 else PR_ATOMIC_INCREMENT(&_pr_userActive); |
| 1171 | 1171 |
| 1172 if (state == PR_JOINABLE_THREAD) { | 1172 if (state == PR_JOINABLE_THREAD) { |
| 1173 if (!thread->term) | 1173 if (!thread->term) |
| 1174 thread->term = PR_NewCondVar(_pr_terminationCVLock); | 1174 thread->term = PR_NewCondVar(_pr_terminationCVLock); |
| 1175 } | 1175 } |
| 1176 else { | 1176 else { |
| 1177 if(thread->term) { | 1177 if(thread->term) { |
| 1178 PR_DestroyCondVar(thread->term); | 1178 PR_DestroyCondVar(thread->term); |
| 1179 thread->term = 0; | 1179 thread->term = 0; |
| 1180 } | 1180 } |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1886 _PR_RUNQ_LOCK(cpu); | 1886 _PR_RUNQ_LOCK(cpu); |
| 1887 _PR_ADD_RUNQ(thread, cpu, pri); | 1887 _PR_ADD_RUNQ(thread, cpu, pri); |
| 1888 _PR_RUNQ_UNLOCK(cpu); | 1888 _PR_RUNQ_UNLOCK(cpu); |
| 1889 if (!_PR_IS_NATIVE_THREAD(me) && (cpu == me->cpu)) { | 1889 if (!_PR_IS_NATIVE_THREAD(me) && (cpu == me->cpu)) { |
| 1890 if (pri > me->priority) { | 1890 if (pri > me->priority) { |
| 1891 _PR_SET_RESCHED_FLAG(); | 1891 _PR_SET_RESCHED_FLAG(); |
| 1892 } | 1892 } |
| 1893 } | 1893 } |
| 1894 #endif | 1894 #endif |
| 1895 } | 1895 } |
| OLD | NEW |