xiaoxiang781216 commented on code in PR #6197:
URL: https://github.com/apache/incubator-nuttx/pull/6197#discussion_r879536802


##########
libs/libc/stdlib/lib_cxa_atexit.c:
##########
@@ -0,0 +1,71 @@
+/****************************************************************************
+ * libs/libc/stdlib/lib_cxa_atexit.c
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <nuttx/atexit.h>
+#include <nuttx/compiler.h>
+#include <nuttx/lib/lib.h>

Review Comment:
   don't need include lib.h and compiler.h



##########
include/nuttx/atexit.h:
##########
@@ -0,0 +1,81 @@
+/****************************************************************************
+ * include/nuttx/atexit.h
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+#ifndef __INCLUDE_NUTTX_ATEXIT_H
+#define __INCLUDE_NUTTX_ATEXIT_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <stdlib.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Amount of exit functions */
+
+#define ATEXIT_MAX (CONFIG_LIBC_MAX_EXITFUNS)

Review Comment:
   remove ()



##########
boards/arm/imx6/sabre-6quad/configs/libcxx/defconfig:
##########
@@ -51,7 +51,6 @@ CONFIG_RAM_VSTART=0x10000000
 CONFIG_RAW_BINARY=y
 CONFIG_READLINE_CMD_HISTORY=y
 CONFIG_RR_INTERVAL=200
-CONFIG_SCHED_ATEXIT=y

Review Comment:
   CONFIG_LIBC_MAX_EXITFUNS=1



##########
libs/libc/stdlib/Kconfig:
##########
@@ -39,4 +39,11 @@ config LIBC_MAX_TMPFILE
                maximum size of that last filename.  This size is the size of 
the full
                file path.
 
+config LIBC_MAX_EXITFUNS
+       int "Maximum amount of exit functions"
+       default 1

Review Comment:
   default value should be 0 since the old config is disabled by default



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to