Much to my astonishment/amusement, it did.
Much to my astonishment/amusement, it did.
Surely "just happened" is the default state of all impossible, cannot happen scenarios?
― Terry Pratchett, Mort
[0] https://github.com/freebsd/freebsd/blob/master/sys/kern/kern...
In traditional BSD kernels, there is a portable layer and a machine dependent layer. The cpu MD layer for context switching was called cpu_switch(), usually written in assembler. It saved the current state and switched to another. When you regained control of the cpu, you returned from cpu_switch(). There was always somewhere to switch to.
When we added multiple threads per process (part of the KSE effort back in the day), a new low level construct was added - cpu_throw(). You switched somewhere else and threw away your context, didn't put the old thread in the run queue, and never returned. We used this for quickly disposing of threads.
This was all fine, thread implementations, process/thread schedulers, etc came and went.
Somewhere along the way, somebody reused the NetBSD MD/asm layer for one of the powerpc architectures. Of course, NetBSD didn't have cpu_throw(). It was #defined to cpu_switch() because it was close enough and worked.
Until somebody tried to use threading on this powerpc architecture. The fake cpu_throw() didn't prevent a return and the system got far enough to reach the upper machine independent layers and hit the panic.
This caused some amusement. Particularly as somebody had previously suggested that the panic was unnecessary as it cannot happen but I wanted to keep it anyway.
For what it stands for, that comes from a story told by a friend in college whose best friend had done a summer working at a navy shipyard with several salty old mechanics.
Their speech was very liberally sprinkled with the word "fuck".
One day, they got an engine in for repair that was in particularly bad shape. After accessing it, one of the mechanics gave his verdict, and at the same time set a new record for the density of "fuck" in their speech.
His verdict: "This fucking fucker's fucked".
I know it’s in jest but I absolutely hate to encounter this kind of thing in the wild. It’s a huge anti pattern and tax you put on other people who have to troubleshoot “impossible” scenarios.
Sure the solution is still one search away, but…
These days, getting a phrase you can Google effectively is golden. I don't care if I'm pasting "Ream my holes with a bottle brush, Sir Clyde, for I am going to be late for tea!" as long as it gets me the information I need to fix the problem faster.
That said, maybe something in Latin would be more couth:
https://multicians.org/hodie-natus-est.html
> HODIE NATUS EST RADICI FRATER
Which means "today unto the Root a brother is born."