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 /* This Source Code Form is subject to the terms of the Mozilla Public | 2 /* This Source Code Form is subject to the terms of the Mozilla Public |
3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | 5 |
6 #ifndef prthread_h___ | 6 #ifndef prthread_h___ |
7 #define prthread_h___ | 7 #define prthread_h___ |
8 | 8 |
9 /* | 9 /* |
10 ** API for NSPR threads. On some architectures (Mac OS Classic | 10 ** API for NSPR threads. On some architectures (Mac OS Classic |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 #define PR_CurrentThread() PR_GetCurrentThread() /* for nspr1.0 compat. */ | 134 #define PR_CurrentThread() PR_GetCurrentThread() /* for nspr1.0 compat. */ |
135 #endif /* NO_NSPR_10_SUPPORT */ | 135 #endif /* NO_NSPR_10_SUPPORT */ |
136 | 136 |
137 /* | 137 /* |
138 ** Get the priority of "thread". | 138 ** Get the priority of "thread". |
139 */ | 139 */ |
140 NSPR_API(PRThreadPriority) PR_GetThreadPriority(const PRThread *thread); | 140 NSPR_API(PRThreadPriority) PR_GetThreadPriority(const PRThread *thread); |
141 | 141 |
142 /* | 142 /* |
143 ** Change the priority of the "thread" to "priority". | 143 ** Change the priority of the "thread" to "priority". |
| 144 ** |
| 145 ** PR_SetThreadPriority works in a best-effort manner. On some platforms a |
| 146 ** special privilege, such as root access, is required to change thread |
| 147 ** priorities, especially to raise thread priorities. If the caller doesn't |
| 148 ** have enough privileges to change thread priorites, the function has no |
| 149 ** effect except causing a future PR_GetThreadPriority call to return |
| 150 ** |priority|. |
144 */ | 151 */ |
145 NSPR_API(void) PR_SetThreadPriority(PRThread *thread, PRThreadPriority priority)
; | 152 NSPR_API(void) PR_SetThreadPriority(PRThread *thread, PRThreadPriority priority)
; |
146 | 153 |
147 /* | 154 /* |
148 ** Set the name of the current thread, which will be visible in a debugger | 155 ** Set the name of the current thread, which will be visible in a debugger |
149 ** and accessible via a call to PR_GetThreadName(). | 156 ** and accessible via a call to PR_GetThreadName(). |
150 */ | 157 */ |
151 NSPR_API(PRStatus) PR_SetCurrentThreadName(const char *name); | 158 NSPR_API(PRStatus) PR_SetCurrentThreadName(const char *name); |
152 | 159 |
153 /* | 160 /* |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 NSPR_API(PRThreadType) PR_GetThreadType(const PRThread *thread); | 263 NSPR_API(PRThreadType) PR_GetThreadType(const PRThread *thread); |
257 | 264 |
258 /* | 265 /* |
259 ** Get the join state of this thread. | 266 ** Get the join state of this thread. |
260 */ | 267 */ |
261 NSPR_API(PRThreadState) PR_GetThreadState(const PRThread *thread); | 268 NSPR_API(PRThreadState) PR_GetThreadState(const PRThread *thread); |
262 | 269 |
263 PR_END_EXTERN_C | 270 PR_END_EXTERN_C |
264 | 271 |
265 #endif /* prthread_h___ */ | 272 #endif /* prthread_h___ */ |
OLD | NEW |