M68k C++ Exceptions working!
Ian Lance Taylor
ian at zembu.com
Fri Jan 14 16:57:23 UTC 2000
Date: Fri, 14 Jan 2000 14:33:30 +0100
From: Eric Valette <valette at crf.canon.fr>
Sorry to jump in but I may add the following (especially regarding the
recent discussion on the interrupt void* argument to hanlder). A single
per thread data software register is usually usefull for multi-thread
programming.
On the i386 I think that would be prohibitively expensive. There are
so few registers as it is.
It's true that many RISC architectures could easily support such a
register. In fact, some assign such a register in the conventional
ABI.
It enables thread executing the same code to store and get
information that is thread specific while not being contained in the
current language local variables scope. This is very similar to having
several interrupt handler executing the same code BUT some per board
specific data (with the notable exception that there is no slocal
variable scope for the primary handler). A single registers can then be
multiplexed by libraries/managers needing to store thread specific info
without seraching a table by the ID of the thread.
rtems_task_get_note(RTEMS_SELF, i, &v) is pretty efficient. It's a
single function call that has no loops and calls no other functions.
(On the other hand, I'm not sure it's interrupt safe.)
Ian
More information about the users
mailing list