Page MenuHomeFreeBSD

Push down td in the NFS server code.
ClosedPublic

Authored by trasz on Mar 1 2019, 2:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 5, 2:59 AM
Unknown Object (File)
Sat, Apr 4, 5:13 AM
Unknown Object (File)
Fri, Apr 3, 1:49 PM
Unknown Object (File)
Wed, Mar 25, 2:37 AM
Unknown Object (File)
Tue, Mar 24, 5:55 PM
Unknown Object (File)
Thu, Mar 19, 8:55 AM
Unknown Object (File)
Thu, Mar 19, 3:32 AM
Unknown Object (File)
Wed, Mar 18, 9:12 PM
Subscribers

Details

Summary

Push down the thread argument in NFS server code, using curthread
instead of passing it explicitly. No functional changes. This is largely
a mechanical change, but I'd still prefer a second pair of eyes to make
sure I hadn't missed anything.

This includes changes from https://reviews.freebsd.org/D19417.
Obviously they will be committed separately.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

trasz edited the summary of this revision. (Show Details)

Looks ok. I'm not sure I understand why having a lot of "struct thread *p = curthread;"s in
the local variables of the functions is an improvement over passing it as an argument,
but I see no harm in it?

This revision is now accepted and ready to land.Mar 2 2019, 8:31 PM

The problem I'm trying to solve is that as it is right now, throughout the entire kernel, it's hard to say if you can call a kernel function for any thread, or just curthread. The way to fix it is to remove the thread argument in cases where it has to be equal to curthread.

I expect most of the newly added 'struct thread *p = curthread;' lines to disappear later on, when I push the 'td' even lower.

This revision now requires review to proceed.Mar 4 2019, 1:08 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 4 2019, 1:12 PM
This revision was automatically updated to reflect the committed changes.