summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2020-05-01 03:47:02 +0000
committermidipix <writeonce@midipix.org>2020-05-01 19:03:04 +0000
commit5ea34cb56684081537ee33b2b786d332c91764f4 (patch)
treef3c1e9b9b6cfc0ebca304ab8e1bbef9a7d6f9209
parent8524cb9777da57ee070d5971e9426165daf96fb2 (diff)
downloadmmglue-5ea34cb56684081537ee33b2b786d332c91764f4.tar.bz2
mmglue-5ea34cb56684081537ee33b2b786d332c91764f4.tar.xz
glue layer: added __fs_tmp{file|dir}(), for fast & atomic tmpfs obj creation.
-rw-r--r--arch/nt32/bits/syscall.h.in3
-rw-r--r--arch/nt64/bits/syscall.h.in3
-rw-r--r--include/sys/fs.h3
-rw-r--r--src/arch/nt32/fs.c10
-rw-r--r--src/arch/nt64/fs.c10
5 files changed, 29 insertions, 0 deletions
diff --git a/arch/nt32/bits/syscall.h.in b/arch/nt32/bits/syscall.h.in
index b9f9820..0383742 100644
--- a/arch/nt32/bits/syscall.h.in
+++ b/arch/nt32/bits/syscall.h.in
@@ -347,6 +347,9 @@
#define __NR_fs_mkdir 358
#define __NR_fs_chmod 359
+#define __NR_fs_tmpfile 360
+#define __NR_fs_tmpdir 361
+
#define __NR_dbg_attach 368
#define __NR_dbg_detach 369
diff --git a/arch/nt64/bits/syscall.h.in b/arch/nt64/bits/syscall.h.in
index b9f9820..0383742 100644
--- a/arch/nt64/bits/syscall.h.in
+++ b/arch/nt64/bits/syscall.h.in
@@ -347,6 +347,9 @@
#define __NR_fs_mkdir 358
#define __NR_fs_chmod 359
+#define __NR_fs_tmpfile 360
+#define __NR_fs_tmpdir 361
+
#define __NR_dbg_attach 368
#define __NR_dbg_detach 369
diff --git a/include/sys/fs.h b/include/sys/fs.h
index bbb8d4d..53246df 100644
--- a/include/sys/fs.h
+++ b/include/sys/fs.h
@@ -51,6 +51,9 @@ int __fs_dpath(int, const char *, int, char *, size_t);
int __fs_mkdir(int, const char *, mode_t, uint32_t);
int __fs_chmod(int, const char *, mode_t, int, uint32_t);
+int __fs_tmpfile(int);
+int __fs_tmpdir(int);
+
#ifdef __cplusplus
}
#endif
diff --git a/src/arch/nt32/fs.c b/src/arch/nt32/fs.c
index 93ccd82..11c9b7d 100644
--- a/src/arch/nt32/fs.c
+++ b/src/arch/nt32/fs.c
@@ -34,3 +34,13 @@ int __fs_chmod(int fdat, const char * path, mode_t mode, int flags, uint32_t ace
{
return syscall(SYS_fs_chmod,fdat,path,mode,flags,ace_flags);
}
+
+int __fs_tmpfile(int flags)
+{
+ return syscall(SYS_fs_tmpfile,flags);
+}
+
+int __fs_tmpdir(int flags)
+{
+ return syscall(SYS_fs_tmpdir,flags);
+}
diff --git a/src/arch/nt64/fs.c b/src/arch/nt64/fs.c
index 93ccd82..11c9b7d 100644
--- a/src/arch/nt64/fs.c
+++ b/src/arch/nt64/fs.c
@@ -34,3 +34,13 @@ int __fs_chmod(int fdat, const char * path, mode_t mode, int flags, uint32_t ace
{
return syscall(SYS_fs_chmod,fdat,path,mode,flags,ace_flags);
}
+
+int __fs_tmpfile(int flags)
+{
+ return syscall(SYS_fs_tmpfile,flags);
+}
+
+int __fs_tmpdir(int flags)
+{
+ return syscall(SYS_fs_tmpdir,flags);
+}