1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:07:34 +00:00

LibC: Mark a bunch of functions as cancellation points

This commit is contained in:
Tim Schumacher 2022-06-12 15:15:09 +02:00 committed by Brian Gianforcaro
parent 899fd74f8e
commit c85f307e62
15 changed files with 78 additions and 0 deletions

View file

@ -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);
}