Not really, they just didn't have setjmp/longjmp yet, they used something else. The real thing you weren't meant to understand was why a routine that was never called returning a value and mostly didn't return a value had to return "1" at that particular point
Yes really, naysayer. They had to fix it in V7 because the code didn't work on the Interdata ... the V6 code only happened to work because of specifics of the PDP-11's calling convention.
Oh totally, I think I made it clear in the writeup that it depended on the pdp11 calling conventions, but it wasn't broken on the pdp11 (and I was able to make it work on my V6 Vax port)
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.
https://www.taniwha.com/~paul/not.html
(I worked for another competitor, UniSoft, SCO ripped us off too, on the 286 port)
Replies (1)
Replies (2)
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.