Note that I didn't say that it was "broken" on the PDP-11 in the sense that the code failed, rather that it was buggy. The savu/aretu mechanism was maldesigned and only worked on the PDP-11 by coincidence, as Ritchie later acknowledged, saying “we didn’t understand what was going on either.” (And no, the comment wasn't about returning 1.)
It's bizarre to say "they just didn't have setjmp/longjmp yet" ... they wrote a fundamentally wrong context switch mechanism. When they realized that it was wrong while trying to debug it for the Interdata port, they wrote save/restore, which wasn't buggy. Later, save/restore was added to libc as setjmp/longjmp.
It's bizarre to say "they just didn't have setjmp/longjmp yet" ... they wrote a fundamentally wrong context switch mechanism. When they realized that it was wrong while trying to debug it for the Interdata port, they wrote save/restore, which wasn't buggy. Later, save/restore was added to libc as setjmp/longjmp.