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)
Mon, Sep 9, 2:11 AM
Unknown Object (File)
Sun, Sep 8, 11:10 AM
Unknown Object (File)
Sun, Sep 8, 1:29 AM
Unknown Object (File)
Sat, Sep 7, 11:11 PM
Unknown Object (File)
Sat, Sep 7, 3:39 PM
Unknown Object (File)
Tue, Sep 3, 5:30 AM
Unknown Object (File)
Sun, Sep 1, 1:10 PM
Unknown Object (File)
Tue, Aug 27, 5:41 AM
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.