summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/sys/mman.cpp
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-06-12 15:15:09 +0200
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-07-22 10:07:15 -0700
commitc85f307e6233397993e18b31d0034ed77bed73d9 (patch)
tree9a9e344799bb9588b848273d0fecbffe1957e3d4 /Userland/Libraries/LibC/sys/mman.cpp
parent899fd74f8ecc7c0b57a555babbad445f87ac36b4 (diff)
downloadserenity-c85f307e6233397993e18b31d0034ed77bed73d9.zip
LibC: Mark a bunch of functions as cancellation points
Diffstat (limited to 'Userland/Libraries/LibC/sys/mman.cpp')
-rw-r--r--Userland/Libraries/LibC/sys/mman.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/sys/mman.cpp b/Userland/Libraries/LibC/sys/mman.cpp
index 9dd9d4ef3a..20c0db4c45 100644
--- a/Userland/Libraries/LibC/sys/mman.cpp
+++ b/Userland/Libraries/LibC/sys/mman.cpp
@@ -5,6 +5,7 @@
*/
#include <AK/Format.h>
+#include <bits/pthread_cancel.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
@@ -110,6 +111,8 @@ int munlock(void const*, size_t)
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/msync.html
int msync(void* address, size_t size, int flags)
{
+ __pthread_maybe_cancel();
+
int rc = syscall(SC_msync, address, size, flags);
__RETURN_WITH_ERRNO(rc, rc, -1);
}