• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
3  * Copyright (c) 2020-2023 Huawei Device Co., Ltd. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without modification,
6  * are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice, this list of
9  *    conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice, this list
12  *    of conditions and the following disclaimer in the documentation and/or other materials
13  *    provided with the distribution.
14  *
15  * 3. Neither the name of the copyright holder nor the names of its contributors may be used
16  *    to endorse or promote products derived from this software without specific prior written
17  *    permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
23  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #ifndef _LOS_PROCESS_PRI_H
33 #define _LOS_PROCESS_PRI_H
34 
35 #include "los_task_pri.h"
36 #include "sched.h"
37 #include "los_sem_pri.h"
38 #include "los_process.h"
39 #include "los_vm_map.h"
40 #ifdef LOSCFG_KERNEL_LITEIPC
41 #include "hm_liteipc.h"
42 #endif
43 #ifdef LOSCFG_SECURITY_CAPABILITY
44 #include "capability_type.h"
45 #endif
46 #ifdef LOSCFG_SECURITY_VID
47 #include "vid_type.h"
48 #endif
49 #include "sys/resource.h"
50 #ifdef LOSCFG_KERNEL_CONTAINER
51 #include "los_container_pri.h"
52 #endif
53 #ifdef LOSCFG_KERNEL_PLIMITS
54 #include "los_plimits.h"
55 #endif
56 
57 #ifdef __cplusplus
58 #if __cplusplus
59 extern "C" {
60 #endif /* __cplusplus */
61 #endif /* __cplusplus */
62 
63 #define OS_PCB_NAME_LEN OS_TCB_NAME_LEN
64 
65 #ifdef LOSCFG_SECURITY_CAPABILITY
66 #define OS_GROUPS_NUMBER_MAX 256
67 
68 typedef struct {
69     UINT32  userID;
70     UINT32  effUserID;
71     UINT32  gid;
72     UINT32  effGid;
73     UINT32  groupNumber;
74     UINT32  groups[1];
75 } User;
76 #endif
77 
78 typedef struct ProcessGroup {
79     UINTPTR      pgroupLeader;    /**< Process group leader is the the process that created the group */
80     LOS_DL_LIST  processList;     /**< List of processes under this process group */
81     LOS_DL_LIST  exitProcessList; /**< List of closed processes (zombie processes) under this group */
82     LOS_DL_LIST  groupList;       /**< Process group list */
83 } ProcessGroup;
84 
85 typedef struct ProcessCB {
86     CHAR                 processName[OS_PCB_NAME_LEN]; /**< Process name */
87     UINT32               processID;                    /**< Process ID */
88     UINT16               processStatus;                /**< [15:4] Process Status; [3:0] The number of threads currently
89                                                             running in the process */
90     UINT16               consoleID;                    /**< The console id of task belongs  */
91     UINT16               processMode;                  /**< Kernel Mode:0; User Mode:1; */
92     struct ProcessCB     *parentProcess;               /**< Parent process */
93     UINT32               exitCode;                     /**< Process exit status */
94     LOS_DL_LIST          pendList;                     /**< Block list to which the process belongs */
95     LOS_DL_LIST          childrenList;                 /**< Children process list */
96     LOS_DL_LIST          exitChildList;                /**< Exit children process list */
97     LOS_DL_LIST          siblingList;                  /**< Linkage in parent's children list */
98     ProcessGroup         *pgroup;                      /**< Process group to which a process belongs */
99     LOS_DL_LIST          subordinateGroupList;         /**< Linkage in group list */
100     LosTaskCB            *threadGroup;
101     LOS_DL_LIST          threadSiblingList;            /**< List of threads under this process */
102     volatile UINT32      threadNumber; /**< Number of threads alive under this process */
103     UINT32               threadCount;  /**< Total number of threads created under this process */
104     LOS_DL_LIST          waitList;     /**< The process holds the waitLits to support wait/waitpid */
105 #ifdef LOSCFG_KERNEL_SMP
106     UINT32               timerCpu;     /**< CPU core number of this task is delayed or pended */
107 #endif
108     UINTPTR              sigHandler;   /**< Signal handler */
109     sigset_t             sigShare;     /**< Signal share bit */
110 #ifdef LOSCFG_KERNEL_LITEIPC
111     ProcIpcInfo          *ipcInfo;      /**< Memory pool for lite ipc */
112 #endif
113 #ifdef LOSCFG_KERNEL_VM
114     LosVmSpace           *vmSpace;     /**< VMM space for processes */
115 #endif
116 #ifdef LOSCFG_FS_VFS
117     struct files_struct  *files;       /**< Files held by the process */
118 #endif
119     timer_t              timerID;      /**< ITimer */
120 
121 #ifdef LOSCFG_SECURITY_CAPABILITY
122     User                *user;
123     UINT32              capability;
124 #endif
125 #ifdef LOSCFG_SECURITY_VID
126     TimerIdMap           timerIdMap;
127 #endif
128 #ifdef LOSCFG_DRIVERS_TZDRIVER
129     struct Vnode        *execVnode;   /**< Exec bin of the process */
130 #endif
131     mode_t               umask;
132 #ifdef LOSCFG_KERNEL_CPUP
133     OsCpupBase           *processCpup; /**< Process cpu usage */
134 #endif
135     struct rlimit        *resourceLimit;
136 #ifdef LOSCFG_KERNEL_CONTAINER
137     Container            *container;
138 #ifdef LOSCFG_USER_CONTAINER
139     struct Credentials   *credentials;
140 #endif
141 #endif
142 #ifdef LOSCFG_PROC_PROCESS_DIR
143     struct ProcDirEntry *procDir;
144 #endif
145 #ifdef LOSCFG_KERNEL_PLIMITS
146     ProcLimiterSet *plimits;
147     LOS_DL_LIST    plimitsList;  /* plimit process list */
148     PLimitsData    limitStat;
149 #endif
150 } LosProcessCB;
151 
152 extern LosProcessCB *g_processCBArray;
153 extern UINT32 g_processMaxNum;
154 
155 #define OS_PCB_FROM_RPID(processID)     (((LosProcessCB *)g_processCBArray) + (processID))
156 #ifdef LOSCFG_PID_CONTAINER
157 #define OS_PCB_FROM_PID(processID)      OsGetPCBFromVpid(processID)
158 #else
159 #define OS_PCB_FROM_PID(processID)      OS_PCB_FROM_RPID(processID)
160 #endif
161 #define OS_PCB_FROM_TCB(taskCB)         ((LosProcessCB *)((taskCB)->processCB))
162 #define OS_PCB_FROM_TID(taskID)         ((LosProcessCB *)(OS_TCB_FROM_TID(taskID)->processCB))
163 #define OS_GET_PGROUP_LEADER(pgroup)    ((LosProcessCB *)((pgroup)->pgroupLeader))
164 #define OS_PCB_FROM_SIBLIST(ptr)        LOS_DL_LIST_ENTRY((ptr), LosProcessCB, siblingList)
165 #define OS_PCB_FROM_PENDLIST(ptr)       LOS_DL_LIST_ENTRY((ptr), LosProcessCB, pendList)
166 
167 /**
168  * @ingroup los_process
169  * Flag that indicates the process or process control block status.
170  *
171  * The process is created but does not participate in scheduling.
172  */
173 #define OS_PROCESS_STATUS_INIT           OS_TASK_STATUS_INIT
174 
175 /**
176  * @ingroup los_process
177  * Flag that indicates the process or process control block status.
178  *
179  * The process is ready.
180  */
181 #define OS_PROCESS_STATUS_READY          OS_TASK_STATUS_READY
182 
183 /**
184  * @ingroup los_process
185  * Flag that indicates the process or process control block status.
186  *
187  * The process is running.
188  */
189 #define OS_PROCESS_STATUS_RUNNING        OS_TASK_STATUS_RUNNING
190 
191 /**
192  * @ingroup los_process
193  * Flag that indicates the process or process control block status.
194  *
195  * The process is pending
196  */
197 #define OS_PROCESS_STATUS_PENDING       (OS_TASK_STATUS_PENDING | OS_TASK_STATUS_DELAY | OS_TASK_STATUS_SUSPENDED)
198 
199 /**
200  * @ingroup los_process
201  * Flag that indicates the process or process control block status.
202  *
203  * The process is run out but the resources occupied by the process are not recovered.
204  */
205 #define OS_PROCESS_STATUS_ZOMBIES        0x0100U
206 
207 /**
208  * @ingroup los_process
209  * Flag that indicates the process or process control block status.
210  *
211  * The process status equal this is process control block unused,
212  * coexisting with OS_PROCESS_STATUS_ZOMBIES means that the control block is not recovered.
213  */
214 #define OS_PROCESS_FLAG_UNUSED            0x0200U
215 
216 /**
217  * @ingroup los_process
218  * Flag that indicates the process or process control block status.
219  *
220  * The process has been call exit, it only works with multiple cores.
221  */
222 #define OS_PROCESS_FLAG_EXIT              0x0400U
223 
224 /**
225  * @ingroup los_process
226  * Flag that indicates the process or process control block status.
227  *
228  * The process is the leader of the process group.
229  */
230 #define OS_PROCESS_FLAG_GROUP_LEADER      0x0800U
231 
232 /**
233  * @ingroup los_process
234  * Flag that indicates the process or process control block status.
235  *
236  * The process has performed the exec operation.
237  */
238 #define OS_PROCESS_FLAG_ALREADY_EXEC      0x1000U
239 
240 /**
241  * @ingroup los_process
242  * Flag that indicates the process or process control block status.
243  *
244  * The process is dying or already dying.
245  */
246 #define OS_PROCESS_STATUS_INACTIVE       (OS_PROCESS_FLAG_EXIT | OS_PROCESS_STATUS_ZOMBIES)
247 
248 /**
249  * @ingroup los_process
250  * Used to check if the process control block is unused.
251  */
OsProcessIsUnused(const LosProcessCB * processCB)252 STATIC INLINE BOOL OsProcessIsUnused(const LosProcessCB *processCB)
253 {
254     return ((processCB->processStatus & OS_PROCESS_FLAG_UNUSED) != 0);
255 }
256 
257 /**
258  * @ingroup los_process
259  * Used to check if the process is inactive.
260  */
OsProcessIsInactive(const LosProcessCB * processCB)261 STATIC INLINE BOOL OsProcessIsInactive(const LosProcessCB *processCB)
262 {
263     return ((processCB->processStatus & (OS_PROCESS_FLAG_UNUSED | OS_PROCESS_STATUS_INACTIVE)) != 0);
264 }
265 
266 /**
267  * @ingroup los_process
268  * Used to check if the process is dead.
269  */
OsProcessIsDead(const LosProcessCB * processCB)270 STATIC INLINE BOOL OsProcessIsDead(const LosProcessCB *processCB)
271 {
272     return ((processCB->processStatus & OS_PROCESS_STATUS_ZOMBIES) != 0);
273 }
274 
OsProcessIsInit(const LosProcessCB * processCB)275 STATIC INLINE BOOL OsProcessIsInit(const LosProcessCB *processCB)
276 {
277     return ((processCB->processStatus & OS_PROCESS_STATUS_INIT) != 0);
278 }
279 
OsProcessIsPGroupLeader(const LosProcessCB * processCB)280 STATIC INLINE BOOL OsProcessIsPGroupLeader(const LosProcessCB *processCB)
281 {
282     return ((processCB->processStatus & OS_PROCESS_FLAG_GROUP_LEADER) != 0);
283 }
284 
285 /**
286  * @ingroup los_process
287  * The highest priority of a kernel mode process.
288  */
289 #define OS_PROCESS_PRIORITY_HIGHEST      0
290 
291 /**
292  * @ingroup los_process
293  * The lowest priority of a kernel mode process
294  */
295 #define OS_PROCESS_PRIORITY_LOWEST       31
296 
297 /**
298  * @ingroup los_process
299  * The highest priority of a user mode process.
300  */
301 #define OS_USER_PROCESS_PRIORITY_HIGHEST 10
302 
303 /**
304  * @ingroup los_process
305  * The lowest priority of a user mode process
306  */
307 #define OS_USER_PROCESS_PRIORITY_LOWEST  OS_PROCESS_PRIORITY_LOWEST
308 
309 /**
310  * @ingroup los_process
311  * User state root process default priority
312  */
313 #define OS_PROCESS_USERINIT_PRIORITY     28
314 
315 /**
316  * @ingroup los_process
317  * ID of the kernel idle process
318  */
319 #define OS_KERNEL_IDLE_PROCESS_ID       0U
320 
321 /**
322  * @ingroup los_process
323  * ID of the user root process
324  */
325 #define OS_USER_ROOT_PROCESS_ID         1U
326 
327 /**
328  * @ingroup los_process
329  * ID of the kernel root process
330  */
331 #define OS_KERNEL_ROOT_PROCESS_ID       2U
332 
333 #define OS_TASK_DEFAULT_STACK_SIZE      0x2000
334 #define OS_USER_TASK_SYSCALL_STACK_SIZE 0x3000
335 #define OS_USER_TASK_STACK_SIZE         0x100000
336 
337 #define OS_KERNEL_MODE 0x0U
338 #define OS_USER_MODE   0x1U
OsProcessIsUserMode(const LosProcessCB * processCB)339 STATIC INLINE BOOL OsProcessIsUserMode(const LosProcessCB *processCB)
340 {
341     return (processCB->processMode == OS_USER_MODE);
342 }
343 
344 #define LOS_PRIO_PROCESS  0U
345 #define LOS_PRIO_PGRP     1U
346 #define LOS_PRIO_USER     2U
347 
348 #define OS_USER_PRIVILEGE_PROCESS_GROUP ((UINTPTR)OsGetUserInitProcess())
349 #define OS_KERNEL_PROCESS_GROUP         ((UINTPTR)OsGetKernelInitProcess())
350 
351 /*
352  * Process exit code
353  * 31    15           8           7        0
354  * |     | exit code  | core dump | signal |
355  */
356 #define OS_PRO_EXIT_OK 0
357 
OsProcessExitCodeCoreDumpSet(LosProcessCB * processCB)358 STATIC INLINE VOID OsProcessExitCodeCoreDumpSet(LosProcessCB *processCB)
359 {
360     processCB->exitCode |= 0x80U;
361 }
362 
OsProcessExitCodeSignalSet(LosProcessCB * processCB,UINT32 signal)363 STATIC INLINE VOID OsProcessExitCodeSignalSet(LosProcessCB *processCB, UINT32 signal)
364 {
365     processCB->exitCode |= signal & 0x7FU;
366 }
367 
OsProcessExitCodeSignalClear(LosProcessCB * processCB)368 STATIC INLINE VOID OsProcessExitCodeSignalClear(LosProcessCB *processCB)
369 {
370     processCB->exitCode &= (~0x7FU);
371 }
372 
OsProcessExitCodeSignalIsSet(LosProcessCB * processCB)373 STATIC INLINE BOOL OsProcessExitCodeSignalIsSet(LosProcessCB *processCB)
374 {
375     return (processCB->exitCode) & 0x7FU;
376 }
377 
OsProcessExitCodeSet(LosProcessCB * processCB,UINT32 code)378 STATIC INLINE VOID OsProcessExitCodeSet(LosProcessCB *processCB, UINT32 code)
379 {
380     processCB->exitCode |= ((code & 0x000000FFU) << 8U) & 0x0000FF00U; /* 8: Move 8 bits to the left, exitCode */
381 }
382 
383 #define OS_PID_CHECK_INVALID(pid) (((UINT32)(pid)) >= g_processMaxNum)
384 
OsProcessIDUserCheckInvalid(UINT32 pid)385 STATIC INLINE BOOL OsProcessIDUserCheckInvalid(UINT32 pid)
386 {
387     return ((pid >= g_processMaxNum) || (pid == 0));
388 }
389 
OsCurrProcessGet(VOID)390 STATIC INLINE LosProcessCB *OsCurrProcessGet(VOID)
391 {
392     UINT32 intSave;
393 
394     intSave = LOS_IntLock();
395     LosProcessCB *runProcess = OS_PCB_FROM_TCB(OsCurrTaskGet());
396     LOS_IntRestore(intSave);
397     return runProcess;
398 }
399 
400 #ifdef LOSCFG_SECURITY_CAPABILITY
OsCurrUserGet(VOID)401 STATIC INLINE User *OsCurrUserGet(VOID)
402 {
403     User *user = NULL;
404     UINT32 intSave;
405 
406     intSave = LOS_IntLock();
407     user = OsCurrProcessGet()->user;
408     LOS_IntRestore(intSave);
409     return user;
410 }
411 
OsProcessUserIDGet(const LosTaskCB * taskCB)412 STATIC INLINE UINT32 OsProcessUserIDGet(const LosTaskCB *taskCB)
413 {
414     UINT32 intSave = LOS_IntLock();
415     UINT32 uid = OS_INVALID;
416 
417     LosProcessCB *process = OS_PCB_FROM_TCB(taskCB);
418     if (process->user != NULL) {
419         uid = process->user->userID;
420     }
421     LOS_IntRestore(intSave);
422     return uid;
423 }
424 #endif
425 
OsIsProcessThreadGroup(const LosTaskCB * taskCB)426 STATIC INLINE BOOL OsIsProcessThreadGroup(const LosTaskCB *taskCB)
427 {
428     return (OS_PCB_FROM_TCB(taskCB)->threadGroup == taskCB);
429 }
430 
OsProcessThreadNumberGet(const LosTaskCB * taskCB)431 STATIC INLINE UINT32 OsProcessThreadNumberGet(const LosTaskCB *taskCB)
432 {
433     return OS_PCB_FROM_TCB(taskCB)->threadNumber;
434 }
435 
436 #ifdef LOSCFG_KERNEL_VM
OsProcessVmSpaceGet(const LosProcessCB * processCB)437 STATIC INLINE LosVmSpace *OsProcessVmSpaceGet(const LosProcessCB *processCB)
438 {
439     return processCB->vmSpace;
440 }
441 #endif
442 
443 #ifdef LOSCFG_DRIVERS_TZDRIVER
OsProcessExecVnodeGet(const LosProcessCB * processCB)444 STATIC INLINE struct Vnode *OsProcessExecVnodeGet(const LosProcessCB *processCB)
445 {
446     return processCB->execVnode;
447 }
448 #endif
449 
OsGetPid(const LosProcessCB * processCB)450 STATIC INLINE UINT32 OsGetPid(const LosProcessCB *processCB)
451 {
452 #ifdef LOSCFG_PID_CONTAINER
453     if (OS_PROCESS_CONTAINER_CHECK(processCB, OsCurrProcessGet())) {
454         return OsGetVpidFromCurrContainer(processCB);
455     }
456 #endif
457     return processCB->processID;
458 }
459 
OsGetRootPid(const LosProcessCB * processCB)460 STATIC INLINE UINT32 OsGetRootPid(const LosProcessCB *processCB)
461 {
462 #ifdef LOSCFG_PID_CONTAINER
463     return OsGetVpidFromRootContainer(processCB);
464 #else
465     return processCB->processID;
466 #endif
467 }
468 
469 /*
470  * return immediately if no child has exited.
471  */
472 #define LOS_WAIT_WNOHANG   (1 << 0U)
473 
474 /*
475  * return if a child has stopped (but not traced via ptrace(2)).
476  * Status for traced children which have stopped is provided even
477  * if this option is not specified.
478  */
479 #define LOS_WAIT_WUNTRACED (1 << 1U)
480 #define LOS_WAIT_WSTOPPED (1 << 1U)
481 
482 /*
483  * Wait for exited processes
484  */
485 #define LOS_WAIT_WEXITED (1 << 2U)
486 
487 /*
488  * return if a stopped child has been resumed by delivery of SIGCONT.
489  * (For Linux-only options, see below.)
490  */
491 #define LOS_WAIT_WCONTINUED (1 << 3U)
492 
493 /*
494  * Leave the child in a waitable state;
495  * a later wait call can be used to again retrieve the child status information.
496  */
497 #define LOS_WAIT_WNOWAIT (1 << 24U)
498 
499 /*
500  * Indicates that you are already in a wait state
501  */
502 #define OS_PROCESS_WAIT     (1 << 15U)
503 
504 /*
505  * Wait for any child process to finish
506  */
507 #define OS_PROCESS_WAIT_ANY OS_TASK_WAIT_ANYPROCESS
508 
509 /*
510  * Wait for the child process specified by the pid to finish
511  */
512 #define OS_PROCESS_WAIT_PRO OS_TASK_WAIT_PROCESS
513 
514 /*
515  * Waits for any child process in the specified process group to finish.
516  */
517 #define OS_PROCESS_WAIT_GID OS_TASK_WAIT_GID
518 
519 #define OS_PROCESS_INFO_ALL 1
520 #define OS_PROCESS_DEFAULT_UMASK 0022
521 
522 extern UINTPTR __user_init_entry;
523 extern UINTPTR __user_init_bss;
524 extern UINTPTR __user_init_end;
525 extern UINTPTR __user_init_load_addr;
526 extern UINT32 OsProcessInit(VOID);
527 extern UINT32 OsSystemProcessCreate(VOID);
528 extern VOID OsProcessNaturalExit(LosProcessCB *processCB, UINT32 status);
529 extern VOID OsProcessCBRecycleToFree(VOID);
530 extern VOID OsProcessResourcesToFree(LosProcessCB *processCB);
531 extern UINT32 OsUserInitProcess(VOID);
532 extern INT32 OsClone(UINT32 flags, UINTPTR sp, UINT32 size);
533 extern VOID OsExecProcessVmSpaceRestore(LosVmSpace *oldSpace);
534 extern LosVmSpace *OsExecProcessVmSpaceReplace(LosVmSpace *newSpace, UINTPTR stackBase, INT32 randomDevFD);
535 extern UINT32 OsExecRecycleAndInit(LosProcessCB *processCB, const CHAR *name, LosVmSpace *oldAspace, UINTPTR oldFiles);
536 extern UINT32 OsExecStart(const TSK_ENTRY_FUNC entry, UINTPTR sp, UINTPTR mapBase, UINT32 mapSize);
537 extern UINT32 OsSetProcessName(LosProcessCB *processCB, const CHAR *name);
538 extern INT32 OsSetProcessScheduler(INT32 which, INT32 pid, UINT16 policy, const LosSchedParam *param);
539 extern INT32 OsGetProcessPriority(INT32 which, INT32 pid);
540 extern LosProcessCB *OsGetUserInitProcess(VOID);
541 extern LosProcessCB *OsGetIdleProcess(VOID);
542 extern INT32 OsSetProcessGroupID(UINT32 pid, UINT32 gid);
543 extern INT32 OsSetCurrProcessGroupID(UINT32 gid);
544 extern LosProcessCB *OsGetKernelInitProcess(VOID);
545 extern VOID OsSetSigHandler(UINTPTR addr);
546 extern UINTPTR OsGetSigHandler(VOID);
547 extern VOID OsWaitWakeTask(LosTaskCB *taskCB, UINT32 wakePID);
548 extern INT32 OsSendSignalToProcessGroup(INT32 pid, siginfo_t *info, INT32 permission);
549 extern INT32 OsSendSignalToAllProcess(siginfo_t *info, INT32 permission);
550 extern UINT32 OsProcessAddNewTask(UINTPTR processID, LosTaskCB *taskCB, SchedParam *param, UINT32 *numCount);
551 extern VOID OsDeleteTaskFromProcess(LosTaskCB *taskCB);
552 extern VOID OsProcessThreadGroupDestroy(VOID);
553 extern UINT32 OsGetProcessGroupCB(UINT32 pid, UINTPTR *ppgroupLeader);
554 extern LosProcessCB *OsGetDefaultProcessCB(VOID);
555 extern ProcessGroup *OsCreateProcessGroup(LosProcessCB *processCB);
556 INT32 OsSchedulerParamCheck(UINT16 policy, BOOL isThread, const LosSchedParam *param);
557 #ifdef __cplusplus
558 #if __cplusplus
559 }
560 #endif /* __cplusplus */
561 #endif /* __cplusplus */
562 
563 #endif
564