1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

Kernel: Rename Locker => MutexLocker

This commit is contained in:
Andreas Kling 2021-07-18 01:13:34 +02:00
parent ab50a1480f
commit 9457d83986
40 changed files with 230 additions and 230 deletions

View file

@ -16,7 +16,7 @@ KResultOr<FlatPtr> Process::sys$gethostname(Userspace<char*> buffer, size_t size
REQUIRE_PROMISE(stdio);
if (size > NumericLimits<ssize_t>::max())
return EINVAL;
Locker locker(*g_hostname_lock, Mutex::Mode::Shared);
MutexLocker locker(*g_hostname_lock, Mutex::Mode::Shared);
if (size < (g_hostname->length() + 1))
return ENAMETOOLONG;
if (!copy_to_user(buffer, g_hostname->characters(), g_hostname->length() + 1))
@ -29,7 +29,7 @@ KResultOr<FlatPtr> Process::sys$sethostname(Userspace<const char*> hostname, siz
REQUIRE_NO_PROMISES;
if (!is_superuser())
return EPERM;
Locker locker(*g_hostname_lock, Mutex::Mode::Exclusive);
MutexLocker locker(*g_hostname_lock, Mutex::Mode::Exclusive);
if (length > 64)
return ENAMETOOLONG;
auto copied_hostname = copy_string_from_user(hostname, length);