VirtualBox

Ignore:
Timestamp:
Nov 6, 2023 8:10:50 PM (18 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
159995
Message:

libs/xpcom: Remove more unused code in nsprpub, bugref:10545

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/pprthred.h

    r101877 r101899  
    5353
    5454#ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
    55 #define PR_AttachThread VBoxNsprPR_AttachThread
    5655#define PR_DetachThread VBoxNsprPR_DetachThread
    5756#define PR_GetThreadID VBoxNsprPR_GetThreadID
     
    6160#define PR_SetCPUAffinityMask VBoxNsprPR_SetCPUAffinityMask
    6261#define PR_ShowStatus VBoxNsprPR_ShowStatus
    63 #define PR_SetThreadRecycleMode VBoxNsprPR_SetThreadRecycleMode
    64 #define PR_CreateThreadGCAble VBoxNsprPR_CreateThreadGCAble
    65 #define PR_AttachThreadGCAble VBoxNsprPR_AttachThreadGCAble
    66 #define PR_SetThreadGCAble VBoxNsprPR_SetThreadGCAble
    67 #define PR_ClearThreadGCAble VBoxNsprPR_ClearThreadGCAble
    68 #define PR_SuspendAll VBoxNsprPR_SuspendAll
    69 #define PR_ResumeAll VBoxNsprPR_ResumeAll
    70 #define PR_GetSP VBoxNsprPR_GetSP
    71 #define GetExecutionEnvironment VBoxNsprGetExecutionEnvironment
    72 #define SetExecutionEnvironment VBoxNsprSetExecutionEnvironment
    73 #define PR_EnumerateThreads VBoxNsprPR_EnumerateThreads
    7462#define PR_ThreadScanStackPointers VBoxNsprPR_ThreadScanStackPointers
    7563#define PR_ScanStackPointers VBoxNsprPR_ScanStackPointers
     
    7967#define PR_TestAndEnterMonitor VBoxNsprPR_TestAndEnterMonitor
    8068#define PR_GetMonitorEntryCount VBoxNsprPR_GetMonitorEntryCount
    81 #define PR_CTestAndEnterMonitor VBoxNsprPR_CTestAndEnterMonitor
    82 #define PR_Mac_WaitForAsyncNotify VBoxNsprPR_Mac_WaitForAsyncNotify
    83 #define PR_Mac_PostAsyncNotify VBoxNsprPR_Mac_PostAsyncNotify
    84 #define PR_OS2_SetFloatExcpHandler VBoxNsprPR_OS2_SetFloatExcpHandler
    85 #define PR_OS2_UnsetFloatExcpHandler VBoxNsprPR_OS2_UnsetFloatExcpHandler
    8669#endif /* VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
    8770
     
    9174** THREAD PRIVATE FUNCTIONS
    9275---------------------------------------------------------------------------*/
    93 
    94 /*
    95 ** Associate a thread object with an existing native thread.
    96 **      "type" is the type of thread object to attach
    97 **      "priority" is the priority to assign to the thread
    98 **      "stack" defines the shape of the threads stack
    99 **
    100 ** This can return NULL if some kind of error occurs, or if memory is
    101 ** tight. This call invokes "start(obj,arg)" and returns when the
    102 ** function returns. The thread object is automatically destroyed.
    103 **
    104 ** This call is not normally needed unless you create your own native
    105 ** 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 attached
    114 ** to it. The exit procs will be invoked.
    115 **
    116 ** This call is not normally needed unless you create your own native
    117 ** thread. PR_Exit will automatially detach the nspr thread object
    118 ** 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);
    12376
    12477/*
     
    160113NSPR_API(PRInt32) PR_SetCPUAffinityMask(PRUint32 mask);
    161114
    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 THREADS           
    175 ---------------------------------------------------------------------------*/
    176 
    177 /*
    178 ** Only Garbage collectible threads participate in resume all, suspend all and
    179 ** enumeration operations.  They are also different during creation when
    180 ** platform specific action may be needed (For example, all Solaris GC able
    181 ** threads are bound threads).
    182 */
    183 
    184 /*
    185 ** Same as PR_CreateThread except that the thread is marked as garbage
    186 ** 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 as
    198 ** 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 by
    216 ** 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 by
    222 ** 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)ExecutionEnvironent
    234 **
    235 ** Used by Java to associate it's execution environment so garbage collector
    236 ** 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 active
    245 ** thread in the process. The enumerator returns PR_SUCCESS if the enumeration
    246 ** should continue, any other value is considered failure, and enumeration
    247 ** 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 FUNCTIONS             
    255 ---------------------------------------------------------------------------*/
    256 
    257 /*
    258 ** Get a pointer to the primordial CPU.
    259 */
    260 NSPR_API(struct _PRCPU *) _PR_GetPrimordialCPU(void);
    261115
    262116/*---------------------------------------------------------------------------
     
    293147NSPR_API(PRIntn) PR_GetMonitorEntryCount(PRMonitor *mon);
    294148
    295 /*
    296 ** Just like PR_CEnterMonitor except that if the monitor is owned by
    297 ** another thread NULL is returned.
    298 */
    299 NSPR_API(PRMonitor*) PR_CTestAndEnterMonitor(void *address);
    300 
    301149/*---------------------------------------------------------------------------
    302150** PLATFORM-SPECIFIC INITIALIZATION FUNCTIONS
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette