summaryrefslogtreecommitdiff
path: root/components/libc/compilers/dlib/syscalls.c
diff options
context:
space:
mode:
authorcliff-cmc <[email protected]>2021-02-26 11:09:27 +0800
committerCliff Chen <[email protected]>2021-02-26 11:45:19 +0800
commiteea0c3d74a40f73235da45c6f77e8b411ac94cf2 (patch)
treea6906f1aed7118ab53dbe18f2ee4727a754583af /components/libc/compilers/dlib/syscalls.c
parent1a9ecf27f31277750d92c921b62503f75275e122 (diff)
parentfae0fa8eea4c0e797940bf1eddc8ee6c1711734a (diff)
Add memtrace command for memheap.c
Diffstat (limited to 'components/libc/compilers/dlib/syscalls.c')
-rw-r--r--components/libc/compilers/dlib/syscalls.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/components/libc/compilers/dlib/syscalls.c b/components/libc/compilers/dlib/syscalls.c
new file mode 100644
index 0000000000..007ea76bd1
--- /dev/null
+++ b/components/libc/compilers/dlib/syscalls.c
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2006-2018, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Change Logs:
+ * Date Author Notes
+ * 2021-02-13 Meco Man implement exit() and abort()
+ * 2021-02-20 Meco Man add system()
+ */
+#include <rtthread.h>
+
+/* for exit() and abort() */
+void __exit (int status)
+{
+ extern void __rt_libc_exit(int status);
+ __rt_libc_exit(status);
+ while(1);
+}
+
+int system(const char * string)
+{
+ extern int __rt_libc_system(const char *string);
+ return __rt_libc_system(string);
+}