summaryrefslogtreecommitdiff
path: root/components/libc/compilers/dlib/syscall_close.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-11-15 23:27:27 +0800
committerGitHub <[email protected]>2021-11-15 23:27:27 +0800
commit0bcab2892a81960ceb394b5cde4bc78eed3326eb (patch)
tree2f6cf7554548f407edb8a51136c76a7a7658a375 /components/libc/compilers/dlib/syscall_close.c
parentef05ecf7c47a8265de19ce8367583de690fb1860 (diff)
parent4fe93881b071ea664b9a5b89c073ad46b9d3e312 (diff)
Merge pull request #5268 from mysterywolf/SYSCALL
[libc]重新梳理read write桩函数实现
Diffstat (limited to 'components/libc/compilers/dlib/syscall_close.c')
-rw-r--r--components/libc/compilers/dlib/syscall_close.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/components/libc/compilers/dlib/syscall_close.c b/components/libc/compilers/dlib/syscall_close.c
index 2897c2418a..aef9673153 100644
--- a/components/libc/compilers/dlib/syscall_close.c
+++ b/components/libc/compilers/dlib/syscall_close.c
@@ -8,10 +8,16 @@
* 2015-01-28 Bernard first version
*/
#include <rtthread.h>
-#include <yfuns.h>
+#include <LowLevelIOInterface.h>
#include <unistd.h>
+/*
+ * The "__close" function should close the file corresponding to
+ * "handle". It should return 0 on success and nonzero on failure.
+ */
+
#pragma module_name = "?__close"
+
int __close(int handle)
{
if (handle == _LLIO_STDOUT ||