Messages in this thread | | | Date | Fri, 14 Aug 2009 12:03:39 +0200 | From | Michael Schnell <> | Subject | Re: implementing Futex |
| |
Arnd Bergmann wrote:
> It sounds like this would be an optional feature of the FPGA code, > and therefore I'd still suggest implementing option A with a compile-time > choice so you don't need to have it.
Yep that is the plan.
If the custom instruction is not provided either the "common area" trick is used or (worse of course) the pthread_mutex calls fall back to use an OS based mutex instead of a FUTEX.
>> If so >> in that code sequence we are in "System Mode". > > Yes.
Great !
Thus supposedly, as of Kernel 2.6.31, We don't need modifications in the Kernel at all for NIOS supporting FUTEX. Only the user land library needs to be tweaked.
OK, if we decide to use the "Common Area for atomic functions" trick, we do need to create same in the Kernel startup code and enhance interrupt return code appropriately. But I suppose we can borrow most of this from the Blackfin or sh implementation.
-Michael
| |