Neil Conway <[EMAIL PROTECTED]> writes: > Does anyone have any idea what this code is intended to do, and why it > is necessary?
A bit of googling (I used "SSIN_UACPROC") will turn up enough info to clue you in. Apparently, on these machines an unaligned memory access causes a trap to the kernel, but the default behavior of the kernel is to emulate the desired memory access and then return control. Fine, but *really* *slow*. So good programming practice is to disable the emulation and fix any thereby-revealed bugs in your code instead. Which is what we're doing in this code. The UAC_SIGBUS option turns off the emulation and makes an unaligned access result in SIGBUS instead. The UAC_NOPRINT option suppresses the "unaligned access" warning message that the kernel may helpfully print about it. I'm not sure why we have the latter as dead code (it is dead, because NOPRINTADE doesn't get defined anywhere). The code samples I found on the net mostly tended to go int buffer[] = {SSIN_UACPROC, UAC_SIGBUS | UAC_NOPRINT}; I would be inclined to get rid of the separate NOPRINTADE code and make NOFIXADE select both flags. The MIPS_FIXADE seems to be the same deal but a different OS' API. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])