From 05333727c688567b90920f3c15785b750f5f3a41 Mon Sep 17 00:00:00 2001 From: Swastik Baranwal Date: Fri, 25 Aug 2023 16:19:26 +0530 Subject: [PATCH] more `thread` to `t` renames (#125) --- kernel/modules/socket/unix/unix.v | 10 ++++------ kernel/modules/userland/signalfd.v | 8 ++++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/kernel/modules/socket/unix/unix.v b/kernel/modules/socket/unix/unix.v index aa512c75b..bddc82511 100644 --- a/kernel/modules/socket/unix/unix.v +++ b/kernel/modules/socket/unix/unix.v @@ -294,13 +294,13 @@ fn (mut this UnixSocket) connect(handle voidptr, _addr voidptr, addrlen u64) ? { return none } - mut thread := proc.current_thread() + mut t := proc.current_thread() path := unsafe { cstring_to_vstring(&addr.sun_path[0]) } C.printf(c'UNIX socket: Wants to connect to %s\n', path.str) - mut target := fs.get_node(thread.process.current_directory, path, true) or { return none } + mut target := fs.get_node(t.process.current_directory, path, true) or { return none } target_res := target.resource @@ -351,13 +351,11 @@ fn (mut this UnixSocket) bind(handle voidptr, _addr voidptr, addrlen u64) ? { return none } - mut thread := proc.current_thread() + mut t := proc.current_thread() path := unsafe { cstring_to_vstring(&addr.sun_path[0]) } - mut node := fs.create(thread.process.current_directory, path, stat.ifsock) or { - return none - } + mut node := fs.create(t.process.current_directory, path, stat.ifsock) or { return none } this.stat = node.resource.stat node.resource = unsafe { this } diff --git a/kernel/modules/userland/signalfd.v b/kernel/modules/userland/signalfd.v index 48a14b7d7..676bea364 100644 --- a/kernel/modules/userland/signalfd.v +++ b/kernel/modules/userland/signalfd.v @@ -89,11 +89,11 @@ pub fn syscall_signalfd(_ voidptr, fdnum int, mask u64, flags int) (u64, u64) { mut signalfd := &SignalFD(unsafe { nil }) mut newfd := int(0) - mut thread := proc.current_thread() + mut t := proc.current_thread() - thread.signalfds_lock.acquire() + t.signalfds_lock.acquire() defer { - thread.signalfds_lock.release() + t.signalfds_lock.release() } if fdnum == -1 { @@ -105,7 +105,7 @@ pub fn syscall_signalfd(_ voidptr, fdnum int, mask u64, flags int) (u64, u64) { return errno.err, errno.get() } - thread.signalfds << voidptr(signalfd) + t.signalfds << voidptr(signalfd) } else { mut fd := file.fd_from_fdnum(voidptr(0), fdnum) or { return errno.err, errno.get() }