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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 */ | 144 */ |
145 NSPR_API(void) PR_SetThreadPriority(PRThread *thread, PRThreadPriority priority)
; | 145 NSPR_API(void) PR_SetThreadPriority(PRThread *thread, PRThreadPriority priority)
; |
146 | 146 |
147 /* | 147 /* |
| 148 ** Set the name of the current thread, which will be visible in a debugger |
| 149 ** and accessible via a call to PR_GetThreadName(). |
| 150 */ |
| 151 NSPR_API(PRStatus) PR_SetCurrentThreadName(const char *name); |
| 152 |
| 153 /* |
| 154 ** Return the name of "thread", if set. Otherwise return NULL. |
| 155 */ |
| 156 NSPR_API(const char *) PR_GetThreadName(const PRThread *thread); |
| 157 |
| 158 /* |
148 ** This routine returns a new index for per-thread-private data table. | 159 ** This routine returns a new index for per-thread-private data table. |
149 ** The index is visible to all threads within a process. This index can | 160 ** The index is visible to all threads within a process. This index can |
150 ** be used with the PR_SetThreadPrivate() and PR_GetThreadPrivate() routines | 161 ** be used with the PR_SetThreadPrivate() and PR_GetThreadPrivate() routines |
151 ** to save and retrieve data associated with the index for a thread. | 162 ** to save and retrieve data associated with the index for a thread. |
152 ** | 163 ** |
153 ** Each index is associationed with a destructor function ('dtor'). The function | 164 ** Each index is associationed with a destructor function ('dtor'). The function |
154 ** may be specified as NULL when the index is created. If it is not NULL, the | 165 ** may be specified as NULL when the index is created. If it is not NULL, the |
155 ** function will be called when: | 166 ** function will be called when: |
156 ** - the thread exits and the private data for the associated index | 167 ** - the thread exits and the private data for the associated index |
157 ** is not NULL, | 168 ** is not NULL, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 NSPR_API(PRThreadType) PR_GetThreadType(const PRThread *thread); | 256 NSPR_API(PRThreadType) PR_GetThreadType(const PRThread *thread); |
246 | 257 |
247 /* | 258 /* |
248 ** Get the join state of this thread. | 259 ** Get the join state of this thread. |
249 */ | 260 */ |
250 NSPR_API(PRThreadState) PR_GetThreadState(const PRThread *thread); | 261 NSPR_API(PRThreadState) PR_GetThreadState(const PRThread *thread); |
251 | 262 |
252 PR_END_EXTERN_C | 263 PR_END_EXTERN_C |
253 | 264 |
254 #endif /* prthread_h___ */ | 265 #endif /* prthread_h___ */ |
OLD | NEW |