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 primpl_h___ | 6 #ifndef primpl_h___ |
7 #define primpl_h___ | 7 #define primpl_h___ |
8 | 8 |
9 /* | 9 /* |
10 * HP-UX 10.10's pthread.h (DCE threads) includes dce/cma.h, which | 10 * HP-UX 10.10's pthread.h (DCE threads) includes dce/cma.h, which |
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
970 | 970 |
971 extern void _PR_MD_END_THREAD(void); | 971 extern void _PR_MD_END_THREAD(void); |
972 #define _PR_MD_END_THREAD _MD_END_THREAD | 972 #define _PR_MD_END_THREAD _MD_END_THREAD |
973 | 973 |
974 extern void _PR_MD_YIELD(void); | 974 extern void _PR_MD_YIELD(void); |
975 #define _PR_MD_YIELD _MD_YIELD | 975 #define _PR_MD_YIELD _MD_YIELD |
976 | 976 |
977 extern void _PR_MD_SET_PRIORITY(_MDThread *md, PRThreadPriority newPri); | 977 extern void _PR_MD_SET_PRIORITY(_MDThread *md, PRThreadPriority newPri); |
978 #define _PR_MD_SET_PRIORITY _MD_SET_PRIORITY | 978 #define _PR_MD_SET_PRIORITY _MD_SET_PRIORITY |
979 | 979 |
| 980 extern void _PR_MD_SET_CURRENT_THREAD_NAME(const char *name); |
| 981 #define _PR_MD_SET_CURRENT_THREAD_NAME _MD_SET_CURRENT_THREAD_NAME |
| 982 |
980 NSPR_API(void) _PR_MD_SUSPENDALL(void); | 983 NSPR_API(void) _PR_MD_SUSPENDALL(void); |
981 #define _PR_MD_SUSPENDALL _MD_SUSPENDALL | 984 #define _PR_MD_SUSPENDALL _MD_SUSPENDALL |
982 | 985 |
983 NSPR_API(void) _PR_MD_RESUMEALL(void); | 986 NSPR_API(void) _PR_MD_RESUMEALL(void); |
984 #define _PR_MD_RESUMEALL _MD_RESUMEALL | 987 #define _PR_MD_RESUMEALL _MD_RESUMEALL |
985 | 988 |
986 extern void _PR_MD_INIT_CONTEXT( | 989 extern void _PR_MD_INIT_CONTEXT( |
987 PRThread *thread, char *top, void (*start) (void), PRBool *status); | 990 PRThread *thread, char *top, void (*start) (void), PRBool *status); |
988 #define _PR_MD_INIT_CONTEXT _MD_INIT_CONTEXT | 991 #define _PR_MD_INIT_CONTEXT _MD_INIT_CONTEXT |
989 | 992 |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1526 /* | 1529 /* |
1527 ** Per thread private data | 1530 ** Per thread private data |
1528 */ | 1531 */ |
1529 PRUint32 tpdLength; /* thread's current vector length */ | 1532 PRUint32 tpdLength; /* thread's current vector length */ |
1530 void **privateData; /* private data vector or NULL */ | 1533 void **privateData; /* private data vector or NULL */ |
1531 PRErrorCode errorCode; /* current NSPR error code | zero */ | 1534 PRErrorCode errorCode; /* current NSPR error code | zero */ |
1532 PRInt32 osErrorCode; /* mapping of errorCode | zero */ | 1535 PRInt32 osErrorCode; /* mapping of errorCode | zero */ |
1533 PRIntn errorStringLength; /* textLength from last call to PR_SetErrorT
ext() */ | 1536 PRIntn errorStringLength; /* textLength from last call to PR_SetErrorT
ext() */ |
1534 PRInt32 errorStringSize; /* malloc()'d size of buffer | zero */ | 1537 PRInt32 errorStringSize; /* malloc()'d size of buffer | zero */ |
1535 char *errorString; /* current error string | NULL */ | 1538 char *errorString; /* current error string | NULL */ |
| 1539 char *name; /* thread's name */ |
1536 | 1540 |
1537 #if defined(_PR_PTHREADS) | 1541 #if defined(_PR_PTHREADS) |
1538 pthread_t id; /* pthread identifier for the thread */ | 1542 pthread_t id; /* pthread identifier for the thread */ |
1539 PRBool okToDelete; /* ok to delete the PRThread struct? */ | 1543 PRBool okToDelete; /* ok to delete the PRThread struct? */ |
1540 PRCondVar *waiting; /* where the thread is waiting | NULL */ | 1544 PRCondVar *waiting; /* where the thread is waiting | NULL */ |
1541 void *sp; /* recorded sp for garbage collection */ | 1545 void *sp; /* recorded sp for garbage collection */ |
1542 PRThread *next, *prev; /* simple linked list of all threads */ | 1546 PRThread *next, *prev; /* simple linked list of all threads */ |
1543 PRUint32 suspend; /* used to store suspend and resume flags */ | 1547 PRUint32 suspend; /* used to store suspend and resume flags */ |
1544 #ifdef PT_NO_SIGTIMEDWAIT | 1548 #ifdef PT_NO_SIGTIMEDWAIT |
1545 pthread_mutex_t suspendResumeMutex; | 1549 pthread_mutex_t suspendResumeMutex; |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1815 #ifdef _PR_ZONE_ALLOCATOR | 1819 #ifdef _PR_ZONE_ALLOCATOR |
1816 extern void _PR_InitZones(void); | 1820 extern void _PR_InitZones(void); |
1817 extern void _PR_DestroyZones(void); | 1821 extern void _PR_DestroyZones(void); |
1818 #endif | 1822 #endif |
1819 | 1823 |
1820 /* Overriding malloc, free, etc. */ | 1824 /* Overriding malloc, free, etc. */ |
1821 #if !defined(_PR_NO_PREEMPT) && defined(XP_UNIX) \ | 1825 #if !defined(_PR_NO_PREEMPT) && defined(XP_UNIX) \ |
1822 && !defined(_PR_PTHREADS) && !defined(_PR_GLOBAL_THREADS_ONLY) \ | 1826 && !defined(_PR_PTHREADS) && !defined(_PR_GLOBAL_THREADS_ONLY) \ |
1823 && !defined(PURIFY) \ | 1827 && !defined(PURIFY) \ |
1824 && !defined(DARWIN) \ | 1828 && !defined(DARWIN) \ |
1825 && !defined(NEXTSTEP) \ | |
1826 && !defined(QNX) \ | 1829 && !defined(QNX) \ |
1827 && !(defined (UNIXWARE) && defined (USE_SVR4_THREADS)) | 1830 && !(defined (UNIXWARE) && defined (USE_SVR4_THREADS)) |
1828 #define _PR_OVERRIDE_MALLOC | 1831 #define _PR_OVERRIDE_MALLOC |
1829 #endif | 1832 #endif |
1830 | 1833 |
1831 /************************************************************************* | 1834 /************************************************************************* |
1832 * External machine-dependent code provided by each OS. *
* | 1835 * External machine-dependent code provided by each OS. *
* |
1833 *************************************************************************/ | 1836 *************************************************************************/ |
1834 | 1837 |
1835 /* Initialization related */ | 1838 /* Initialization related */ |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2087 | 2090 |
2088 extern ConnectListNode connectList[64]; | 2091 extern ConnectListNode connectList[64]; |
2089 | 2092 |
2090 extern PRUint32 connectCount; | 2093 extern PRUint32 connectCount; |
2091 | 2094 |
2092 #endif /* XP_BEOS */ | 2095 #endif /* XP_BEOS */ |
2093 | 2096 |
2094 PR_END_EXTERN_C | 2097 PR_END_EXTERN_C |
2095 | 2098 |
2096 #endif /* primpl_h___ */ | 2099 #endif /* primpl_h___ */ |
OLD | NEW |