Hi,
Thank you for your quick reply.
--- Quote Start ---
As Linux allows the user land code to create as many Futexes as it desires, the Futex variables need to be located in normal RAM, and thus the standard Futex user-library and Kernel code needs to be used. The only thing that needs to be done architecture-specific is the userland atomic instructions.
--- Quote End ---
Of course, I'm thinking not only one 'hardware mutex' but special memory regions that emulate atomic codes. Each futex 'pointer' for their counters points one special 'hardware mutex' respectively. 'Hardware mutex' will limits the amount of futex counters, but do you need those more than one thousand? Of course, if there is a law that prohibits to change the type of futex counters, this method is impossible.
--- Quote Start ---
Here Hippo suggested to follow the way that the BlackFin people, featuring the same problem, go: defining an "atomic region" that holds the appropriate functions and gets special handling by the Kernel's interrupt code.
--- Quote End ---
If the main maintainer supports this plan, I will obey it.
--- Quote Start ---
Some hardware support (disabling the interrupt for a limited time that is automatically cut by the hardware) might be constructed at a later time if desired and optionally be enabled when configuring the system.
--- Quote End ---
I think that 'disabling the interrupt for a limited time' is quite difficult because we can't detect the instruction despatch and know what pipeline stage deals with the interruptions.
Kazu