Move _assert to kernel space.

Signed-off-by: 田昕 <tianxin7@xiaomi.com>
This commit is contained in:
田昕 2022-12-06 14:33:13 +08:00 committed by Xiang Xiao
parent c2d75c930b
commit 2719869ab2
6 changed files with 31 additions and 5 deletions

View file

@ -25,6 +25,7 @@
*/
SYSCALL_LOOKUP1(_exit, 1)
SYSCALL_LOOKUP(_assert, 2)
SYSCALL_LOOKUP(getpid, 0)
SYSCALL_LOOKUP(gettid, 0)
SYSCALL_LOOKUP(prctl, 2)
@ -99,7 +100,6 @@ SYSCALL_LOOKUP(sem_wait, 1)
#endif
SYSCALL_LOOKUP(task_setcancelstate, 2)
SYSCALL_LOOKUP(up_assert, 2)
#ifdef CONFIG_CANCELLATION_POINTS
SYSCALL_LOOKUP(task_setcanceltype, 2)

View file

@ -18,8 +18,6 @@
#
############################################################################
CSRCS += lib_assert.c
ifeq ($(CONFIG_STACK_CANARIES),y)
CSRCS += lib_stackchk.c
endif

View file

@ -25,6 +25,7 @@ include environ/Make.defs
include group/Make.defs
include init/Make.defs
include irq/Make.defs
include misc/Make.defs
include mqueue/Make.defs
include module/Make.defs
include paging/Make.defs

27
sched/misc/Make.defs Normal file
View file

@ -0,0 +1,27 @@
############################################################################
# sched/misc/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################
CSRCS += assert.c
# Include init build support
DEPPATH += --dep-path misc
VPATH += :misc

View file

@ -1,5 +1,5 @@
/****************************************************************************
* libs/libc/assert/lib_assert.c
* sched/misc/assert.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with

View file

@ -1,4 +1,5 @@
"_exit","unistd.h","","noreturn","int"
"_assert","assert.h","","noreturn","FAR const char *","int"
"accept","sys/socket.h","defined(CONFIG_NET)","int","int","FAR struct sockaddr *","FAR socklen_t *"
"adjtime","sys/time.h","defined(CONFIG_CLOCK_TIMEKEEPING)","int","FAR const struct timeval *","FAR struct timeval *"
"aio_cancel","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb *"
@ -183,7 +184,6 @@
"umount2","sys/mount.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char *","unsigned int"
"unlink","unistd.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char *"
"unsetenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","int","FAR const char *"
"up_assert","nuttx/arch.h","","void","FAR const char *","int"
"utimens","sys/stat.h","","int","FAR const char *","const struct timespec [2]|FAR const struct timespec *"
"vfork","unistd.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_ARCH_HAVE_VFORK)","pid_t"
"wait","sys/wait.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)","pid_t","FAR int *"

Can't render this file because it has a wrong number of fields in line 2.