Changeset 101899 in vbox for trunk/src/libs/xpcom18a4/nsprpub/pr/include/private
- Timestamp:
- Nov 6, 2023 8:10:50 PM (18 months ago)
- svn:sync-xref-src-repo-rev:
- 159995
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/pprthred.h
r101877 r101899 53 53 54 54 #ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP 55 #define PR_AttachThread VBoxNsprPR_AttachThread56 55 #define PR_DetachThread VBoxNsprPR_DetachThread 57 56 #define PR_GetThreadID VBoxNsprPR_GetThreadID … … 61 60 #define PR_SetCPUAffinityMask VBoxNsprPR_SetCPUAffinityMask 62 61 #define PR_ShowStatus VBoxNsprPR_ShowStatus 63 #define PR_SetThreadRecycleMode VBoxNsprPR_SetThreadRecycleMode64 #define PR_CreateThreadGCAble VBoxNsprPR_CreateThreadGCAble65 #define PR_AttachThreadGCAble VBoxNsprPR_AttachThreadGCAble66 #define PR_SetThreadGCAble VBoxNsprPR_SetThreadGCAble67 #define PR_ClearThreadGCAble VBoxNsprPR_ClearThreadGCAble68 #define PR_SuspendAll VBoxNsprPR_SuspendAll69 #define PR_ResumeAll VBoxNsprPR_ResumeAll70 #define PR_GetSP VBoxNsprPR_GetSP71 #define GetExecutionEnvironment VBoxNsprGetExecutionEnvironment72 #define SetExecutionEnvironment VBoxNsprSetExecutionEnvironment73 #define PR_EnumerateThreads VBoxNsprPR_EnumerateThreads74 62 #define PR_ThreadScanStackPointers VBoxNsprPR_ThreadScanStackPointers 75 63 #define PR_ScanStackPointers VBoxNsprPR_ScanStackPointers … … 79 67 #define PR_TestAndEnterMonitor VBoxNsprPR_TestAndEnterMonitor 80 68 #define PR_GetMonitorEntryCount VBoxNsprPR_GetMonitorEntryCount 81 #define PR_CTestAndEnterMonitor VBoxNsprPR_CTestAndEnterMonitor82 #define PR_Mac_WaitForAsyncNotify VBoxNsprPR_Mac_WaitForAsyncNotify83 #define PR_Mac_PostAsyncNotify VBoxNsprPR_Mac_PostAsyncNotify84 #define PR_OS2_SetFloatExcpHandler VBoxNsprPR_OS2_SetFloatExcpHandler85 #define PR_OS2_UnsetFloatExcpHandler VBoxNsprPR_OS2_UnsetFloatExcpHandler86 69 #endif /* VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */ 87 70 … … 91 74 ** THREAD PRIVATE FUNCTIONS 92 75 ---------------------------------------------------------------------------*/ 93 94 /*95 ** Associate a thread object with an existing native thread.96 ** "type" is the type of thread object to attach97 ** "priority" is the priority to assign to the thread98 ** "stack" defines the shape of the threads stack99 **100 ** This can return NULL if some kind of error occurs, or if memory is101 ** tight. This call invokes "start(obj,arg)" and returns when the102 ** function returns. The thread object is automatically destroyed.103 **104 ** This call is not normally needed unless you create your own native105 ** thread. PR_Init does this automatically for the primordial thread.106 */107 NSPR_API(PRThread*) PR_AttachThread(PRThreadType type,108 PRThreadPriority priority,109 PRThreadStack *stack);110 111 /*112 ** Detach the nspr thread from the currently executing native thread.113 ** The thread object will be destroyed and all related data attached114 ** to it. The exit procs will be invoked.115 **116 ** This call is not normally needed unless you create your own native117 ** thread. PR_Exit will automatially detach the nspr thread object118 ** created by PR_Init for the primordial thread.119 **120 ** This call returns after the nspr thread object is destroyed.121 */122 NSPR_API(void) PR_DetachThread(void);123 76 124 77 /* … … 160 113 NSPR_API(PRInt32) PR_SetCPUAffinityMask(PRUint32 mask); 161 114 162 /*163 ** Show status of all threads to standard error output.164 */165 NSPR_API(void) PR_ShowStatus(void);166 167 /*168 ** Set thread recycle mode to on (1) or off (0)169 */170 NSPR_API(void) PR_SetThreadRecycleMode(PRUint32 flag);171 172 173 /*---------------------------------------------------------------------------174 ** THREAD PRIVATE FUNCTIONS FOR GARBAGE COLLECTIBLE THREADS175 ---------------------------------------------------------------------------*/176 177 /*178 ** Only Garbage collectible threads participate in resume all, suspend all and179 ** enumeration operations. They are also different during creation when180 ** platform specific action may be needed (For example, all Solaris GC able181 ** threads are bound threads).182 */183 184 /*185 ** Same as PR_CreateThread except that the thread is marked as garbage186 ** collectible.187 */188 NSPR_API(PRThread*) PR_CreateThreadGCAble(PRThreadType type,189 void (*start)(void *arg),190 void *arg,191 PRThreadPriority priority,192 PRThreadScope scope,193 PRThreadState state,194 PRUint32 stackSize);195 196 /*197 ** Same as PR_AttachThread except that the thread being attached is marked as198 ** garbage collectible.199 */200 NSPR_API(PRThread*) PR_AttachThreadGCAble(PRThreadType type,201 PRThreadPriority priority,202 PRThreadStack *stack);203 204 /*205 ** Mark the thread as garbage collectible.206 */207 NSPR_API(void) PR_SetThreadGCAble(void);208 209 /*210 ** Unmark the thread as garbage collectible.211 */212 NSPR_API(void) PR_ClearThreadGCAble(void);213 214 /*215 ** This routine prevents all other GC able threads from running. This call is needed by216 ** the garbage collector.217 */218 NSPR_API(void) PR_SuspendAll(void);219 220 /*221 ** This routine unblocks all other GC able threads that were suspended from running by222 ** PR_SuspendAll(). This call is needed by the garbage collector.223 */224 NSPR_API(void) PR_ResumeAll(void);225 226 /*227 ** Return the thread stack pointer of the given thread.228 ** Needed by the garbage collector.229 */230 NSPR_API(void *) PR_GetSP(PRThread *thread);231 232 /*233 ** (Get|Set)ExecutionEnvironent234 **235 ** Used by Java to associate it's execution environment so garbage collector236 ** can find it. If return is NULL, then it's probably not a collectable thread.237 **238 ** There's no locking required around these calls.239 */240 NSPR_API(void*) GetExecutionEnvironment(PRThread *thread);241 NSPR_API(void) SetExecutionEnvironment(PRThread* thread, void *environment);242 243 /*244 ** Enumeration function that applies "func(thread,i,arg)" to each active245 ** thread in the process. The enumerator returns PR_SUCCESS if the enumeration246 ** should continue, any other value is considered failure, and enumeration247 ** stops, returning the failure value from PR_EnumerateThreads.248 ** Needed by the garbage collector.249 */250 typedef PRStatus (PR_CALLBACK *PREnumerator)(PRThread *t, int i, void *arg);251 NSPR_API(PRStatus) PR_EnumerateThreads(PREnumerator func, void *arg);252 253 /*---------------------------------------------------------------------------254 ** THREAD CPU PRIVATE FUNCTIONS255 ---------------------------------------------------------------------------*/256 257 /*258 ** Get a pointer to the primordial CPU.259 */260 NSPR_API(struct _PRCPU *) _PR_GetPrimordialCPU(void);261 115 262 116 /*--------------------------------------------------------------------------- … … 293 147 NSPR_API(PRIntn) PR_GetMonitorEntryCount(PRMonitor *mon); 294 148 295 /*296 ** Just like PR_CEnterMonitor except that if the monitor is owned by297 ** another thread NULL is returned.298 */299 NSPR_API(PRMonitor*) PR_CTestAndEnterMonitor(void *address);300 301 149 /*--------------------------------------------------------------------------- 302 150 ** PLATFORM-SPECIFIC INITIALIZATION FUNCTIONS
Note:
See TracChangeset
for help on using the changeset viewer.