Looks like it's at line 2238 if anyone is interested in taking a look at it and the code that we are so famously not required to understand.
Looks like it's at line 2238 if anyone is interested in taking a look at it and the code that we are so famously not required to understand.
https://systemswe.love/archive/san-francisco-2016/you-are-no...
The crucial thing to note here is that the second comment (the famous one) has nothing to do with the text above about the savu. So we don't even understand 'You're not expected to understand this'.
As dmr explained there was a problem with stack switching when they ported UNIX to the Interdata because stacks of different functions weren't necessarily compatible, and switching out the stack of a function was a bad idea. For this reason you see dummy variables declared in the Interdata port so the stack layout of different functions would match. On the PDP-11 all stack frames were compatible so this was less of a problem. As dmr said, this was cleaned up in v7.
The comment above it is a different matter. The stack is normally saved in u_rsav (iirc) but this is overwritten when a process is swapped out. In that case the stack to restore is saved in u_ssav. This same behaviour is still in v7 and yet the 'not expected' comment is gone. This is what Lions explains somewhere in his book.