aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/0025-make-fsync-fdatasync-and-msync-cancellation-points.patch
blob: 7315bba9882ab8cbd16fd5652fd8d45c86f6c8b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 0b21a07c783d18051d86b1d6ddc04a8ea716a12f Mon Sep 17 00:00:00 2001
From: Trutz Behn <me@trutz.be>
Date: Wed, 28 Jan 2015 18:46:54 +0100
Subject: [PATCH] make fsync, fdatasync, and msync cancellation points

these are mandatory cancellation points per POSIX, so their omission
was a conformance bug.
---
 src/mman/msync.c       | 2 +-
 src/unistd/fdatasync.c | 2 +-
 src/unistd/fsync.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mman/msync.c b/src/mman/msync.c
index bb20475..fcd8cdf 100644
--- a/src/mman/msync.c
+++ b/src/mman/msync.c
@@ -3,5 +3,5 @@
 
 int msync(void *start, size_t len, int flags)
 {
-	return syscall(SYS_msync, start, len, flags);
+	return syscall_cp(SYS_msync, start, len, flags);
 }
diff --git a/src/unistd/fdatasync.c b/src/unistd/fdatasync.c
index dd4d41c..3895ae5 100644
--- a/src/unistd/fdatasync.c
+++ b/src/unistd/fdatasync.c
@@ -3,5 +3,5 @@
 
 int fdatasync(int fd)
 {
-	return syscall(SYS_fdatasync, fd);
+	return syscall_cp(SYS_fdatasync, fd);
 }
diff --git a/src/unistd/fsync.c b/src/unistd/fsync.c
index dc4727c..7a1c80b 100644
--- a/src/unistd/fsync.c
+++ b/src/unistd/fsync.c
@@ -3,5 +3,5 @@
 
 int fsync(int fd)
 {
-	return syscall(SYS_fsync, fd);
+	return syscall_cp(SYS_fsync, fd);
 }
-- 
2.3.3