提交 b5ae9e25 编写于 作者: A arvinzzz

feature: fix liteos_a_newlib_kernel compiler error & libc update

Signed-off-by: Narvinzzz <zhaotianyu9@huawei.com>
Change-Id: I4a8c2cfb2ba044f000026f738c6da1781cb7db35
上级 c2b5a589
...@@ -27,10 +27,11 @@ ...@@ -27,10 +27,11 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifdef LOSCFG_KERNEL_CONTAINER
#include "los_container_pri.h" #include "los_container_pri.h"
#include "los_process_pri.h" #include "los_process_pri.h"
#include "internal.h" #include "internal.h"
#ifdef LOSCFG_KERNEL_CONTAINER
STATIC Container g_rootContainer; STATIC Container g_rootContainer;
STATIC ContainerLimit g_containerLimit; STATIC ContainerLimit g_containerLimit;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifdef LOSCFG_MNT_CONTAINER
#include <unistd.h> #include <unistd.h>
#include "los_mnt_container_pri.h" #include "los_mnt_container_pri.h"
#include "los_container_pri.h" #include "los_container_pri.h"
...@@ -36,7 +37,6 @@ ...@@ -36,7 +37,6 @@
#include "vnode.h" #include "vnode.h"
#include "internal.h" #include "internal.h"
#ifdef LOSCFG_MNT_CONTAINER
STATIC UINT32 g_currentMntContainerNum; STATIC UINT32 g_currentMntContainerNum;
LIST_HEAD *GetContainerMntList(VOID) LIST_HEAD *GetContainerMntList(VOID)
......
...@@ -27,13 +27,14 @@ ...@@ -27,13 +27,14 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifdef LOSCFG_NET_CONTAINER
#include <sched.h> #include <sched.h>
#include "los_net_container_pri.h" #include "los_net_container_pri.h"
#include "los_config.h" #include "los_config.h"
#include "los_memory.h" #include "los_memory.h"
#include "los_process_pri.h" #include "los_process_pri.h"
#ifdef LOSCFG_NET_CONTAINER
STATIC UINT32 g_currentNetContainerNum = 0; STATIC UINT32 g_currentNetContainerNum = 0;
STATIC NetContainer *g_rootNetContainer = NULL; STATIC NetContainer *g_rootNetContainer = NULL;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifdef LOSCFG_USER_CONTAINER
#include "los_user_container_pri.h" #include "los_user_container_pri.h"
#include "errno.h" #include "errno.h"
#include "ctype.h" #include "ctype.h"
...@@ -47,7 +48,6 @@ ...@@ -47,7 +48,6 @@
#define OCT 8 #define OCT 8
#define DEC 10 #define DEC 10
#ifdef LOSCFG_USER_CONTAINER
UINT32 g_currentUserContainerNum = 0; UINT32 g_currentUserContainerNum = 0;
UINT32 OsCreateUserContainer(Credentials *newCredentials, UserContainer *parentUserContainer) UINT32 OsCreateUserContainer(Credentials *newCredentials, UserContainer *parentUserContainer)
......
...@@ -28,12 +28,11 @@ ...@@ -28,12 +28,11 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifdef LOSCFG_UTS_CONTAINER
#include "internal.h" #include "internal.h"
#include "los_uts_container_pri.h" #include "los_uts_container_pri.h"
#include "los_process_pri.h" #include "los_process_pri.h"
#ifdef LOSCFG_UTS_CONTAINER
STATIC UINT32 g_currentUtsContainerNum; STATIC UINT32 g_currentUtsContainerNum;
STATIC UINT32 InitUtsContainer(struct utsname *name) STATIC UINT32 InitUtsContainer(struct utsname *name)
......
...@@ -109,6 +109,7 @@ STATIC VOID GetProcessInfo(ProcessInfo *pcbInfo, const LosProcessCB *processCB) ...@@ -109,6 +109,7 @@ STATIC VOID GetProcessInfo(ProcessInfo *pcbInfo, const LosProcessCB *processCB)
(VOID)memcpy_s(pcbInfo->name, OS_PCB_NAME_LEN, processCB->processName, OS_PCB_NAME_LEN); (VOID)memcpy_s(pcbInfo->name, OS_PCB_NAME_LEN, processCB->processName, OS_PCB_NAME_LEN);
} }
#ifdef LOSCFG_KERNEL_VM
STATIC VOID GetProcessMemInfo(ProcessInfo *pcbInfo, const LosProcessCB *processCB, LosVmSpace *vmSpace) STATIC VOID GetProcessMemInfo(ProcessInfo *pcbInfo, const LosProcessCB *processCB, LosVmSpace *vmSpace)
{ {
/* Process memory usage statistics, idle task defaults to 0 */ /* Process memory usage statistics, idle task defaults to 0 */
...@@ -130,6 +131,7 @@ STATIC VOID GetProcessMemInfo(ProcessInfo *pcbInfo, const LosProcessCB *processC ...@@ -130,6 +131,7 @@ STATIC VOID GetProcessMemInfo(ProcessInfo *pcbInfo, const LosProcessCB *processC
} }
} }
} }
#endif
STATIC VOID GetThreadInfo(ProcessThreadInfo *threadInfo, LosProcessCB *processCB) STATIC VOID GetThreadInfo(ProcessThreadInfo *threadInfo, LosProcessCB *processCB)
{ {
...@@ -182,7 +184,9 @@ UINT32 OsGetProcessThreadInfo(UINT32 pid, ProcessThreadInfo *threadInfo) ...@@ -182,7 +184,9 @@ UINT32 OsGetProcessThreadInfo(UINT32 pid, ProcessThreadInfo *threadInfo)
return LOS_NOK; return LOS_NOK;
} }
#ifdef LOSCFG_KERNEL_VM
GetProcessMemInfo(&threadInfo->processInfo, processCB, processCB->vmSpace); GetProcessMemInfo(&threadInfo->processInfo, processCB, processCB->vmSpace);
#endif
SCHEDULER_LOCK(intSave); SCHEDULER_LOCK(intSave);
GetProcessInfo(&threadInfo->processInfo, processCB); GetProcessInfo(&threadInfo->processInfo, processCB);
...@@ -210,11 +214,14 @@ STATIC VOID ProcessMemUsageGet(ProcessInfo *pcbArray) ...@@ -210,11 +214,14 @@ STATIC VOID ProcessMemUsageGet(ProcessInfo *pcbArray)
pcbInfo->status = OS_PROCESS_FLAG_UNUSED; pcbInfo->status = OS_PROCESS_FLAG_UNUSED;
continue; continue;
} }
#ifdef LOSCFG_KERNEL_VM
LosVmSpace *vmSpace = processCB->vmSpace; LosVmSpace *vmSpace = processCB->vmSpace;
#endif
SCHEDULER_UNLOCK(intSave); SCHEDULER_UNLOCK(intSave);
#ifdef LOSCFG_KERNEL_VM
GetProcessMemInfo(pcbInfo, processCB, vmSpace); GetProcessMemInfo(pcbInfo, processCB, vmSpace);
#endif
} }
} }
......
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifdef LOSCFG_KERNEL_DEV_PLIMIT
#include "los_seq_buf.h" #include "los_seq_buf.h"
#include "los_bitmap.h" #include "los_bitmap.h"
#include "los_process_pri.h" #include "los_process_pri.h"
#include "los_devicelimit.h" #include "los_devicelimit.h"
#ifdef LOSCFG_KERNEL_DEV_PLIMIT
#define TYPE_CHAR_LEN (1) #define TYPE_CHAR_LEN (1)
#define DEVICE_NAME_PREFIX_SPACE (1) #define DEVICE_NAME_PREFIX_SPACE (1)
#define DEVICE_ACCESS_MAXLEN (3) #define DEVICE_ACCESS_MAXLEN (3)
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifdef LOSCFG_KERNEL_IPC_PLIMIT
#include "los_ipclimit.h" #include "los_ipclimit.h"
#include "los_process_pri.h" #include "los_process_pri.h"
#ifdef LOSCFG_KERNEL_IPC_PLIMIT
STATIC ProcIPCLimit *g_rootIPCLimit = NULL; STATIC ProcIPCLimit *g_rootIPCLimit = NULL;
#define PLIMIT_IPC_SHM_LIMIT_MAX 0xFFFFFFFF #define PLIMIT_IPC_SHM_LIMIT_MAX 0xFFFFFFFF
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifdef LOSCFG_KERNEL_MEM_PLIMIT
#include <stdlib.h> #include <stdlib.h>
#include <securec.h> #include <securec.h>
#include "los_config.h" #include "los_config.h"
...@@ -35,7 +36,6 @@ ...@@ -35,7 +36,6 @@
#include "los_process_pri.h" #include "los_process_pri.h"
#include "los_plimits.h" #include "los_plimits.h"
#ifdef LOSCFG_KERNEL_MEM_PLIMIT
STATIC ProcMemLimiter *g_procMemLimiter = NULL; STATIC ProcMemLimiter *g_procMemLimiter = NULL;
VOID OsMemLimiterInit(UINTPTR limite) VOID OsMemLimiterInit(UINTPTR limite)
......
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifdef LOSCFG_KERNEL_PLIMITS
#include "los_base.h" #include "los_base.h"
#include "los_process_pri.h" #include "los_process_pri.h"
#include "hal_timer.h" #include "hal_timer.h"
#include "los_plimits.h" #include "los_plimits.h"
#ifdef LOSCFG_KERNEL_PLIMITS
typedef struct PlimiteOperations { typedef struct PlimiteOperations {
VOID (*LimiterInit)(UINTPTR); VOID (*LimiterInit)(UINTPTR);
VOID *(*LimiterAlloc)(VOID); VOID *(*LimiterAlloc)(VOID);
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifdef LOSCFG_KERNEL_PLIMITS
#include "los_config.h" #include "los_config.h"
#include "los_process_pri.h" #include "los_process_pri.h"
#include "los_process.h" #include "los_process.h"
...@@ -35,7 +36,6 @@ ...@@ -35,7 +36,6 @@
#include "los_task_pri.h" #include "los_task_pri.h"
#include "los_processlimit.h" #include "los_processlimit.h"
#ifdef LOSCFG_KERNEL_PLIMITS
STATIC PidLimit *g_rootPidLimit = NULL; STATIC PidLimit *g_rootPidLimit = NULL;
VOID PidLimiterInit(UINTPTR limit) VOID PidLimiterInit(UINTPTR limit)
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifdef LOSCFG_KERNEL_SCHED_PLIMIT
#include "los_schedlimit.h" #include "los_schedlimit.h"
#include "los_process_pri.h" #include "los_process_pri.h"
#ifdef LOSCFG_KERNEL_SCHED_PLIMIT
STATIC ProcSchedLimiter *g_procSchedLimit = NULL; STATIC ProcSchedLimiter *g_procSchedLimit = NULL;
VOID OsSchedLimitInit(UINTPTR limit) VOID OsSchedLimitInit(UINTPTR limit)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册