CVSROOT:        /cvs
Module name:    src
Changes by:     m...@cvs.openbsd.org    2013/08/26 15:38:09

Modified files:
        lib/librthread/arch/m88k: cerror.S 
        sys/arch/m88k/include: proc.h tcb.h 
        sys/arch/m88k/m88k: trap.c 

Log message:
Use %r27 as the thread control block pointer, allowing for __get_tcb() calls
in libpthread to be optimized away.

While there, follow DG/UX's example of using more than one register for thread
purposes (after all, the ABI reserves four of them), and also use %r26 to store
a pointer to the current thread's errno.

Since it is not possible to initialize %r26 at thread creation without
intrusive and potentially race-prone changes, have __tfork() reset %r26 to
zero, and libpthread's __cerror lazy initialize it. As soon as %r26 is nonzero,
it will be used instead of calling __errno().

This means that binaries linked against HEAD libpthread need to run on HEAD
kernels, and we are belatedly jumping on the 64-bit time_t bump (since there
are no 64-bit time_t m88k snapshots yet).

Joint work with guenther@; "Your love of asm is sick and wrong, and yet
beautiful." and ok guenther@

Reply via email to