| 1 | // Licensed to the .NET Foundation under one or more agreements. |
| 2 | // The .NET Foundation licenses this file to you under the MIT license. |
| 3 | // See the LICENSE file in the project root for more information. |
| 4 | |
| 5 | /*++ |
| 6 | |
| 7 | |
| 8 | |
| 9 | Module Name: |
| 10 | |
| 11 | thread/procprivate.hpp |
| 12 | |
| 13 | Abstract: |
| 14 | |
| 15 | Private process structures and routines |
| 16 | |
| 17 | Revision History: |
| 18 | |
| 19 | |
| 20 | |
| 21 | --*/ |
| 22 | |
| 23 | #ifndef _PAL_PROCPRIVATE_HPP_ |
| 24 | #define _PAL_PROCPRIVATE_HPP_ |
| 25 | |
| 26 | #include "pal/thread.hpp" |
| 27 | |
| 28 | namespace CorUnix |
| 29 | { |
| 30 | |
| 31 | /*++ |
| 32 | Function: |
| 33 | PROCAddThread |
| 34 | |
| 35 | Abstract |
| 36 | Add a thread to the thread list of the current process |
| 37 | --*/ |
| 38 | void PROCAddThread(CPalThread *pCurrentThread, CPalThread *pTargetThread); |
| 39 | |
| 40 | extern CPalThread *pGThreadList; |
| 41 | |
| 42 | /*++ |
| 43 | Function: |
| 44 | PROCRemoveThread |
| 45 | |
| 46 | Abstract |
| 47 | Remove a thread form the thread list of the current process |
| 48 | --*/ |
| 49 | void PROCRemoveThread(CPalThread *pCurrentThread, CPalThread *pTargetThread); |
| 50 | |
| 51 | /*++ |
| 52 | Function: |
| 53 | PROCGetNumberOfThreads |
| 54 | |
| 55 | Abstract |
| 56 | Return the number of threads in the thread list. |
| 57 | --*/ |
| 58 | INT PROCGetNumberOfThreads(void); |
| 59 | |
| 60 | |
| 61 | /*++ |
| 62 | Function: |
| 63 | TerminateCurrentProcessNoExit |
| 64 | |
| 65 | Parameters: |
| 66 | BOOL bTerminateUnconditionally - If this is set, the PAL will exit as |
| 67 | quickly as possible. In particular, it will not unload DLLs. |
| 68 | |
| 69 | Abstract: |
| 70 | Terminate Current Process, but leave the caller alive |
| 71 | --*/ |
| 72 | void TerminateCurrentProcessNoExit(BOOL bTerminateUnconditionally); |
| 73 | |
| 74 | } |
| 75 | |
| 76 | #endif //_PAL_PROCPRIVATE_HPP_ |
| 77 | |
| 78 | |
| 79 | |