James Bellamy
9c1ee8cbd1
Kernel: Remove big lock from sys$socket
...
With the implementation of the credentials object the socket syscall no
longer needs the big lock.
2022-08-23 20:29:50 +02:00
Andreas Kling
930dedfbd8
Kernel: Make sys$utime() and sys$utimensat() not take the big lock
2022-08-22 17:56:03 +02:00
Andreas Kling
35b2e9c663
Kernel: Make sys$mknod() not take the big lock
2022-08-22 17:56:03 +02:00
Andreas Kling
18abba2c4d
Kernel: Make sys$getppid() not take the big lock
...
This only needs to access the process PPID, which is protected by the
"protected data" lock.
2022-08-21 13:29:36 +02:00
Andreas Kling
998c1152ef
Kernel: Mark syscalls that get/set user/group ID as not needing big lock
...
Now that these operate on the neatly atomic and immutable Credentials
object, they should no longer require the process big lock for
synchronization. :^)
2022-08-20 18:36:47 +02:00
Samuel Bowman
b5a2f59320
Kernel: Make sys$unveil() not take the big process lock
...
The unveil syscall uses the UnveilData struct which is already
SpinlockProtected, so there is no need to take the big lock.
2022-08-18 00:04:31 +02:00
Andreas Kling
ce6e93d96b
Kernel: Make sys$socketpair() not take the big lock
...
This system call mainly accesses the file descriptor table, and this is
already guarded by MutexProtected.
2022-08-16 20:43:23 +02:00
Andreas Kling
307932857e
Kernel: Make sys$pipe() not take the big lock
...
This system call mainly accesses the file descriptor table, and this is
already guarded by MutexProtected.
2022-08-16 20:20:11 +02:00
Andreas Kling
e7d2696a56
Kernel: Shrink default userspace stack size from 4 MiB to 1 MiB
...
This knocks 70 MiB off our idle footprint, (from 350 MiB to 280 MiB.)
2022-08-15 17:18:11 +02:00
zzLinus
ca74443012
Kernel/LibC: Implement posix syscall clock_getres()
2022-07-25 15:33:50 +02:00
Hendiadyoin1
d783389877
Kernel+LibC: Add posix_fallocate syscall
2022-07-15 12:42:43 +02:00
Tim Schumacher
cf0ad3715e
Kernel: Implement sigsuspend
using a SignalBlocker
...
`sigsuspend` was previously implemented using a poll on an empty set of
file descriptors. However, this broke quite a few assumptions in
`SelectBlocker`, as it verifies at least one file descriptor to be
ready after waking up and as it relies on being notified by the file
descriptor.
A bare-bones `sigsuspend` may also be implemented by relying on any of
the `sigwait` functions, but as `sigsuspend` features several (currently
unimplemented) restrictions on how returns work, it is a syscall on its
own.
2022-07-08 22:27:38 +00:00
Ariel Don
9a6bd85924
Kernel+LibC+VFS: Implement utimensat(3)
...
Create POSIX utimensat() library call and corresponding system call to
update file access and modification times.
2022-05-21 18:15:00 +02:00
Patrick Meyer
0bd131ad06
Kernel: Stop requiring working malloc for syscall.h includes
...
Fixes #13869
2022-05-02 12:44:34 +02:00
Idan Horowitz
e84bbfed44
Kernel: Remove big lock from sys$mkdir
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Idan Horowitz
165a23b68c
Kernel: Remove big lock from sys$rename
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Idan Horowitz
5c064d3e8e
Kernel: Remove big lock from sys$rmdir
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Idan Horowitz
d4ce43cf45
Kernel: Remove big lock from sys$statvfs
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Idan Horowitz
4ae93179f1
Kernel: Remove big lock from sys$symlink
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Idan Horowitz
1474b18070
Kernel: Remove big lock from sys$link
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Idan Horowitz
fa360f7d88
Kernel: Remove big lock from sys$unlink
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Idan Horowitz
5a96260e25
Kernel: Remove big lock from sys$setsockopt
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Idan Horowitz
c2372242b1
Kernel: Remove big lock from sys$getsockopt
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Idan Horowitz
849c227f72
Kernel: Remove big lock from sys$shutdown
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Idan Horowitz
e620487b66
Kernel: Remove big lock from sys$connect
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Idan Horowitz
9547a8e8a2
Kernel: Remove big lock from sys$close
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Idan Horowitz
0297349922
Kernel: Remove big lock from sys$chown
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Idan Horowitz
8458313e8a
Kernel: Remove big lock from sys$fchown
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Idan Horowitz
f986a3b886
Kernel: Remove big lock from sys$bind
...
This syscall doesn't access any unprotected shared data.
2022-04-09 23:46:02 +02:00
Luke Wilde
1682b0b6d8
Kernel: Remove big lock from sys$set_coredump_metadata
...
The only requirement for this syscall is to make
Process::m_coredump_properties SpinlockProtected.
2022-04-09 21:51:16 +02:00
Jelle Raaijmakers
cc411b328c
Kernel: Remove big lock from sys$accept4
...
The only thing we needed to check is whether `socket.accept()` returns
a socket, and if not, we go back to blocking again.
2022-04-09 17:53:18 +02:00
Andreas Kling
12b612ab14
Kernel: Mark sys$adjtime() as not needing the big lock
...
This syscall works on global kernel state and so doesn't need protection
from threads in the same process.
2022-04-04 00:42:18 +02:00
Andreas Kling
4306422f29
Kernel: Mark sys$clock_settime() as not needing the big log
...
This syscall ends up disabling interrupts while changing the time,
and the clock is a global resource anyway, so preventing threads in the
same process from running wouldn't solve anything.
2022-04-04 00:42:18 +02:00
Andreas Kling
55814f6e0e
Kernel: Mark sys$sched_{set,get}param() as not needing the big lock
...
Both of these syscalls take the scheduler lock while accessing the
thread priority, so there's no reliance on the process big lock.
2022-04-04 00:42:18 +02:00
Andreas Kling
36d829b97c
Kernel: Mark sys$listen() as not needing the big lock
...
This syscall already performs the necessary locking and so doesn't
need to rely on the process big lock.
2022-04-03 22:22:22 +02:00
Andreas Kling
bc4282c773
Kernel: Mark sys$sendfd() and sys$recvfd() as not needing the big lock
...
These syscalls already perform the necessary locking and don't rely on
the process big lock.
2022-04-03 22:06:03 +02:00
Idan Horowitz
086969277e
Everywhere: Run clang-format
2022-04-01 21:24:45 +01:00
Liav A
b5ef900ccd
Kernel: Don't assume paths of TTYs and pseudo terminals anymore
...
The obsolete ttyname and ptsname syscalls are removed.
LibC doesn't rely on these anymore, and it helps simplifying the Kernel
in many places, so it's an overall an improvement.
In addition to that, /proc/PID/tty node is removed too as it is not
needed anymore by userspace to get the attached TTY of a process, as
/dev/tty (which is already a character device) represents that as well.
2022-03-22 20:26:05 +01:00
Andreas Kling
7b3642d08c
Kernel: Mark sys$lseek() as not needing the big lock
...
This syscall doesn't access any data that was implicitly protected by
the big lock.
2022-03-09 16:43:00 +01:00
Andreas Kling
09e644f0ba
Kernel: Mark sys$emuctl() as not needing the big lock
...
This syscall doesn't do anything at all, and definitely doesn't need the
big lock. :^)
2022-03-09 16:43:00 +01:00
Andreas Kling
b4fefedd1d
Kernel: Mark sys$chmod() as not needing the big lock
...
This syscall doesn't access any data that was implicitly protected by
the big lock.
2022-03-09 16:43:00 +01:00
Andreas Kling
aa381c4a67
Kernel: Mark sys$fchmod() as not needing the big lock
...
This syscall doesn't access any data that was implicitly protected by
the big lock.
2022-03-09 16:43:00 +01:00
Andreas Kling
d074aae422
Kernel: Mark sys$dup2() as not needing the big lock
...
This syscall doesn't access any data that was implicitly protected by
the big lock.
2022-03-09 16:43:00 +01:00
Andreas Kling
8aad9e7448
Kernel: Mark sys$ftruncate() as not needing the big lock
...
This syscall doesn't access any data that was implicitly protected by
the big lock.
2022-03-09 16:43:00 +01:00
Andreas Kling
69a6a4d927
Kernel: Mark sys$fstatvfs() as not needing the big lock
...
This syscall doesn't access any data that was implicitly protected by
the big lock.
2022-03-09 16:43:00 +01:00
Tim Schumacher
5200cdac43
Kernel: Remove an unused fd_set.h import
...
The project appears to build just fine without it, and the explicit use
of `LibC` causes it to conflict with the system-wide `fd_set.h` when
building inside of Serenity.
2022-03-08 16:18:48 -08:00
Andreas Kling
6354a9a030
Kernel: Mark sys$fsync() as not needing the big lock
...
This syscall doesn't access any data that was implicitly protected by
the big lock.
2022-03-08 00:19:49 +01:00
Andreas Kling
ef45ff4703
Kernel: Mark sys$readlink() as not needing the big lock
...
This syscall doesn't access any data that was implicitly protected by
the big lock.
2022-03-08 00:19:49 +01:00
Andreas Kling
2688ee28ff
Kernel: Mark sys$stat() as not needing the big lock
...
This syscall doesn't access any data that was implicitly protected by
the big lock.
2022-03-08 00:19:49 +01:00
Andreas Kling
be7ec52ed0
Kernel: Mark sys$fstat() as not needing the big lock
...
This syscall doesn't access any data that was implicitly protected by
the big lock.
2022-03-08 00:19:49 +01:00