LibC: Implement pthread cancelation

This code is not tested at all but it looks correct xD
This commit is contained in:
2025-06-01 00:59:22 +03:00
parent 56fdf6002c
commit dbdefa0f4a
15 changed files with 165 additions and 16 deletions

View File

@@ -1,3 +1,4 @@
#include <pthread.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include <unistd.h>
@@ -25,6 +26,7 @@ int munmap(void* addr, size_t len)
int msync(void* addr, size_t len, int flags)
{
pthread_testcancel();
return syscall(SYS_MSYNC, addr, len, flags);
}