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() }