mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:47:34 +00:00
Kernel: Remove the now defunct LOCKER(..)
macro.
This commit is contained in:
parent
0d5827f865
commit
8d6e9fad40
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