mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-14 06:59:10 +00:00
Further improve ipv4.games server
This commit is contained in:
parent
3b4fcd8575
commit
32321ab1e9
9 changed files with 307 additions and 113 deletions
|
@ -554,6 +554,8 @@ static const uint16_t kPledgeStdio[] = {
|
|||
__NR_linux_set_robust_list, //
|
||||
__NR_linux_get_robust_list, //
|
||||
__NR_linux_prlimit | STDIO, //
|
||||
__NR_linux_sched_getaffinity, //
|
||||
__NR_linux_sched_setaffinity, //
|
||||
};
|
||||
|
||||
static const uint16_t kPledgeFlock[] = {
|
||||
|
@ -705,8 +707,6 @@ static const uint16_t kPledgeProc[] = {
|
|||
__NR_linux_sched_setscheduler, //
|
||||
__NR_linux_sched_get_priority_min, //
|
||||
__NR_linux_sched_get_priority_max, //
|
||||
__NR_linux_sched_getaffinity, //
|
||||
__NR_linux_sched_setaffinity, //
|
||||
__NR_linux_sched_getparam, //
|
||||
__NR_linux_sched_setparam, //
|
||||
};
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/pledge.internal.h"
|
||||
#include "libc/calls/state.internal.h"
|
||||
#include "libc/intrin/strace.internal.h"
|
||||
#include "libc/calls/syscall-sysv.internal.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/promises.internal.h"
|
||||
#include "libc/intrin/strace.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
|
@ -110,7 +110,7 @@
|
|||
* fcntl(F_SETFD), fcntl(F_GETFL), fcntl(F_SETFL), sched_yield,
|
||||
* epoll_create, epoll_create1, epoll_ctl, epoll_wait, epoll_pwait,
|
||||
* epoll_pwait2, clone(CLONE_THREAD), futex, set_robust_list,
|
||||
* get_robust_list, sigpending.
|
||||
* get_robust_list, setaffinity, sigpending.
|
||||
*
|
||||
* - "rpath" (read-only path ops) allows chdir, getcwd, open(O_RDONLY),
|
||||
* openat(O_RDONLY), stat, fstat, lstat, fstatat, access, faccessat,
|
||||
|
|
|
@ -77,6 +77,6 @@ int sched_getaffinity(int tid, size_t size, cpu_set_t *bitset) {
|
|||
}
|
||||
rc = 0;
|
||||
}
|
||||
STRACE("sched_getaffinity(%d, %'zu, %p) → %d% m", tid, size, bitset);
|
||||
STRACE("sched_getaffinity(%d, %'zu, %p) → %d% m", tid, size, bitset, rc);
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -85,6 +85,6 @@ int sched_setaffinity(int tid, size_t size, const cpu_set_t *bitset) {
|
|||
} else {
|
||||
rc = sys_sched_setaffinity(tid, size, bitset);
|
||||
}
|
||||
STRACE("sched_setaffinity(%d, %'zu, %p) → %d% m", tid, size, bitset);
|
||||
STRACE("sched_setaffinity(%d, %'zu, %p) → %d% m", tid, size, bitset, rc);
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue