mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 16:47:45 +00:00
Kernel: Rename Locker => MutexLocker
This commit is contained in:
parent
ab50a1480f
commit
9457d83986
40 changed files with 230 additions and 230 deletions
|
@ -525,7 +525,7 @@ KResult Process::do_exec(NonnullRefPtr<FileDescription> main_program_description
|
|||
// We commit to the new executable at this point. There is no turning back!
|
||||
|
||||
// Prevent other processes from attaching to us with ptrace while we're doing this.
|
||||
Locker ptrace_locker(ptrace_lock());
|
||||
MutexLocker ptrace_locker(ptrace_lock());
|
||||
|
||||
// Disable profiling temporarily in case it's running on this process.
|
||||
auto was_profiling = m_profiling;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -37,7 +37,7 @@ static KResultOr<u32> handle_ptrace(const Kernel::Syscall::SC_ptrace_params& par
|
|||
if (!peer)
|
||||
return ESRCH;
|
||||
|
||||
Locker ptrace_locker(peer->process().ptrace_lock());
|
||||
MutexLocker ptrace_locker(peer->process().ptrace_lock());
|
||||
|
||||
if ((peer->process().uid() != caller.euid())
|
||||
|| (peer->process().uid() != peer->process().euid())) // Disallow tracing setuid processes
|
||||
|
|
|
@ -15,7 +15,7 @@ KResultOr<FlatPtr> Process::sys$uname(Userspace<utsname*> user_buf)
|
|||
|
||||
REQUIRE_PROMISE(stdio);
|
||||
|
||||
Locker locker(*g_hostname_lock, Mutex::Mode::Shared);
|
||||
MutexLocker locker(*g_hostname_lock, Mutex::Mode::Shared);
|
||||
if (g_hostname->length() + 1 > sizeof(utsname::nodename))
|
||||
return ENAMETOOLONG;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue