Merge branch 'master' of gitee.com:openharmony/kernel_liteos_a into misc

This commit is contained in:
wcc
2021-07-27 01:40:59 +00:00
committed by Gitee
648 changed files with 8430 additions and 2078 deletions

View File

@@ -43,7 +43,7 @@ extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#if (LOSCFG_KERNEL_SMP == YES)
#ifdef LOSCFG_KERNEL_SMP
typedef enum {
CPU_RUNNING = 0, /* cpu is running */
CPU_HALT, /* cpu in the halt */
@@ -66,7 +66,7 @@ typedef struct {
UINT32 swtmrTaskID; /* software timer task id */
UINT32 schedFlag; /* pending scheduler flag */
#if (LOSCFG_KERNEL_SMP == YES)
#ifdef LOSCFG_KERNEL_SMP
UINT32 excFlag; /* cpu halt or exc flag */
#endif
} Percpu;

View File

@@ -36,7 +36,7 @@
#include "los_sem_pri.h"
#include "los_process.h"
#include "los_vm_map.h"
#if (LOSCFG_KERNEL_LITEIPC == YES)
#ifdef LOSCFG_KERNEL_LITEIPC
#include "hm_liteipc.h"
#endif
#ifdef LOSCFG_SECURITY_CAPABILITY
@@ -97,12 +97,12 @@ typedef struct ProcessCB {
volatile UINT32 threadNumber; /**< Number of threads alive under this process */
UINT32 threadCount; /**< Total number of threads created under this process */
LOS_DL_LIST waitList; /**< The process holds the waitLits to support wait/waitpid */
#if (LOSCFG_KERNEL_SMP == YES)
#ifdef LOSCFG_KERNEL_SMP
UINT32 timerCpu; /**< CPU core number of this task is delayed or pended */
#endif
UINTPTR sigHandler; /**< Signal handler */
sigset_t sigShare; /**< Signal share bit */
#if (LOSCFG_KERNEL_LITEIPC == YES)
#ifdef LOSCFG_KERNEL_LITEIPC
ProcIpcInfo ipcInfo; /**< Memory pool for lite ipc */
#endif
#ifdef LOSCFG_KERNEL_VM
@@ -443,7 +443,7 @@ extern UINTPTR __user_init_bss;
extern UINTPTR __user_init_end;
extern UINTPTR __user_init_load_addr;
extern UINT32 OsSystemProcessCreate(VOID);
extern VOID OsProcessCBRecyleToFree(VOID);
extern VOID OsProcessCBRecycleToFree(VOID);
extern VOID OsProcessResourcesToFree(LosProcessCB *processCB);
extern VOID OsProcessExit(LosTaskCB *runTask, INT32 status);
extern UINT32 OsUserInitProcess(VOID);

View File

@@ -112,7 +112,7 @@ STATIC INLINE BOOL OsPreemptableInSched(VOID)
{
BOOL preemptable = FALSE;
#if (LOSCFG_KERNEL_SMP == YES)
#ifdef LOSCFG_KERNEL_SMP
/*
* For smp systems, schedule must hold the task spinlock, and this counter
* will increase by 1 in that case.

View File

@@ -50,7 +50,7 @@ typedef enum {
typedef struct {
LOS_DL_LIST sortLinkNode;
UINT64 responseTime;
#if (LOSCFG_KERNEL_SMP == YES)
#ifdef LOSCFG_KERNEL_SMP
UINT32 cpuid;
#endif
} SortLinkList;

View File

@@ -45,7 +45,9 @@
#include "los_cpup_pri.h"
#endif
#ifdef LOSCFG_KERNEL_TRACE
#include "los_trace.h"
#endif
#ifdef __cplusplus
#if __cplusplus
@@ -344,14 +346,14 @@ typedef struct {
INT32 errorNo; /**< Error Num */
UINT32 signal; /**< Task signal */
sig_cb sig;
#if (LOSCFG_KERNEL_SMP == YES)
#ifdef LOSCFG_KERNEL_SMP
UINT16 currCpu; /**< CPU core number of this task is running on */
UINT16 lastCpu; /**< CPU core number of this task is running on last time */
UINT16 cpuAffiMask; /**< CPU affinity mask, support up to 16 cores */
#if (LOSCFG_KERNEL_SMP_TASK_SYNC == YES)
#ifdef LOSCFG_KERNEL_SMP_TASK_SYNC
UINT32 syncSignal; /**< Synchronization for signal handling */
#endif
#if (LOSCFG_KERNEL_SMP_LOCKDEP == YES)
#ifdef LOSCFG_KERNEL_SMP_LOCKDEP
LockDep lockDep;
#endif
#endif
@@ -368,7 +370,7 @@ typedef struct {
UINTPTR waitID; /**< Wait for the PID or GID of the child process */
UINT16 waitFlag; /**< The type of child process that is waiting, belonging to a group or parent,
a specific child process, or any child process */
#if (LOSCFG_KERNEL_LITEIPC == YES)
#ifdef LOSCFG_KERNEL_LITEIPC
UINT32 ipcStatus;
LOS_DL_LIST msgListHead;
BOOL accessMap[LOSCFG_BASE_CORE_TSK_LIMIT];