On most architectures it uses a CPU register, so no library call. On
some ARMs it uses a fast call to a very short function provided by the
kernel.
This of course would need compiler support. I don't suppose, out of the
box, the compiler allows for dedicating a CPU register for a special
purpose.
My idea would be to have the process scheduler manage a certain memory
cell (fixed and accessible to user land programs (non MMU !) or defined
by a (non-specific) pointer each thread can provide ) and save a thread
specific value value each thread can provide there.
But how to modify the scheduler ?
I seem to remember that the new Linux design allows for "plug-in"
schedulers. Could that help to design something like that ?
-Michael
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev