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
Andreas Kling
23822febd2
Kernel: Mark sys$fchdir() 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
156ab0c47d
Kernel: Mark sys$chdir() 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
7597bef771
Kernel: Mark sys$getcwd() 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
f630d0f095
Kernel: Mark sys$realpath() 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
7543c34d07
Kernel: Mark sys$anon_create() as not needing the big lock
...
This syscall is already safe for no-big-lock since it doesn't access any
unprotected data.
2022-03-08 00:19:49 +01:00
Andreas Kling
baa6ff5649
Kernel: Wrap HIDManagement keymap data in SpinlockProtected
...
This serializes access to the current keymap data everywhere in the
kernel, allowing to mark sys$setkeymap() as not needing the big lock.
2022-03-07 16:35:23 +01:00
Lucas CHOLLET
839d3d9f74
Kernel: Add getrusage() syscall
...
Only the two timeval fields are maintained, as required by the POSIX
standard.
2022-02-28 20:09:37 +01:00
Daniel Bertalan
182016d7c0
Kernel+LibC+LibCore+UE: Implement fchmodat(2)
...
This function is an extended version of `chmod(2)` that lets one control
whether to dereference symlinks, and specify a file descriptor to a
directory that will be used as the base for relative paths.
2022-01-12 14:54:12 +01:00
circl
63760603f3
Kernel+LibC+LibCore: Add lchown and fchownat functions
...
This modifies sys$chown to allow specifying whether or not to follow
symlinks and in which directory.
This was then used to implement lchown and fchownat in LibC and LibCore.
2022-01-01 15:08:49 +01:00
Owen Smith
e6df1c9988
Kernel: Implement and use the syscall/sysret instruction pair on x86_64
2021-12-28 23:15:38 +01:00
Daniel Bertalan
8e3d1a42e3
Kernel+UE+LibC: Store address as void* in SC_m{re,}map_params
...
Most other syscalls pass address arguments as `void*` instead of
`uintptr_t`, so let's do that here too. Besides improving consistency,
this commit makes `strace` correctly pretty-print these arguments in
hex.
2021-12-23 23:08:10 +01:00
Jean-Baptiste Boric
23257cac52
Kernel: Remove sys$select() syscall
...
Now that the userland has a compatiblity wrapper for select(), the
kernel doesn't need to implement this syscall natively. The poll()
interface been around since 1987, any code still using select()
should be slapped silly.
Note: the SerenityOS source tree mostly uses select() and not poll()
despite SerenityOS having support for poll() since early 2019...
2021-12-12 21:48:50 +01:00
Idan Horowitz
762e047ec9
Kernel+LibC: Implement sigtimedwait()
...
This includes a new Thread::Blocker called SignalBlocker which blocks
until a signal of a matching type is pending. The current Blocker
implementation in the Kernel is very complicated, but cleaning it up is
a different yak for a different day.
2021-12-12 08:34:19 +02:00
Ben Wiederhake
0f8483f09c
Kernel: Implement new ptrace function PT_PEEKBUF
...
This enables the tracer to copy large amounts of data in a much saner
way.
2021-12-05 22:59:09 +01:00