diff options
author | Sergey Bugaev <bugaevc@serenityos.org> | 2020-04-18 12:50:35 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-18 13:58:29 +0200 |
commit | 54550365ebfe3ed18e2ae6b5d2d23990380cb800 (patch) | |
tree | b13ff23325432a2baee7308fbd1a72a5733dec86 /Kernel/Process.cpp | |
parent | 05ba4295e9613710d6333ddd213f094708a4a27c (diff) | |
download | serenity-54550365ebfe3ed18e2ae6b5d2d23990380cb800.zip |
Kernel: Use shared locking mode in some places
The notable piece of code that remains to be converted is Ext2FS.
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r-- | Kernel/Process.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 23709611f7..45c5623863 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -704,7 +704,7 @@ int Process::sys$gethostname(char* buffer, ssize_t size) return -EINVAL; if (!validate_write(buffer, size)) return -EFAULT; - LOCKER(*s_hostname_lock); + LOCKER(*s_hostname_lock, Lock::Mode::Shared); if ((size_t)size < (s_hostname->length() + 1)) return -ENAMETOOLONG; copy_to_user(buffer, s_hostname->characters(), s_hostname->length() + 1); @@ -2157,7 +2157,7 @@ int Process::sys$uname(utsname* buf) REQUIRE_PROMISE(stdio); if (!validate_write_typed(buf)) return -EFAULT; - LOCKER(*s_hostname_lock); + LOCKER(*s_hostname_lock, Lock::Mode::Shared); if (s_hostname->length() + 1 > sizeof(utsname::nodename)) return -ENAMETOOLONG; copy_to_user(buf->sysname, "SerenityOS", 11); |