mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-27 04:37:22 +00:00
Kernel: Remove the now defunct LOCKER(..)
macro.
This commit is contained in:
parent
0d5827f865
commit
8d6e9fad40
Notes:
sideshowbarker
2024-07-18 19:07:40 +09:00
Author: https://github.com/bgianfo
Commit: 8d6e9fad40
Pull-request: https://github.com/SerenityOS/serenity/pull/6601
31 changed files with 196 additions and 198 deletions
|
@ -16,7 +16,7 @@ KResultOr<int> Process::sys$gethostname(Userspace<char*> buffer, ssize_t size)
|
|||
REQUIRE_PROMISE(stdio);
|
||||
if (size < 0)
|
||||
return EINVAL;
|
||||
LOCKER(*g_hostname_lock, Lock::Mode::Shared);
|
||||
Locker locker(*g_hostname_lock, Lock::Mode::Shared);
|
||||
if ((size_t)size < (g_hostname->length() + 1))
|
||||
return ENAMETOOLONG;
|
||||
if (!copy_to_user(buffer, g_hostname->characters(), g_hostname->length() + 1))
|
||||
|
@ -31,7 +31,7 @@ KResultOr<int> Process::sys$sethostname(Userspace<const char*> hostname, ssize_t
|
|||
return EPERM;
|
||||
if (length < 0)
|
||||
return EINVAL;
|
||||
LOCKER(*g_hostname_lock, Lock::Mode::Exclusive);
|
||||
Locker locker(*g_hostname_lock, Lock::Mode::Exclusive);
|
||||
if (length > 64)
|
||||
return ENAMETOOLONG;
|
||||
auto copied_hostname = copy_string_from_user(hostname, length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue