Jamie Lokier wrote: > You can't implement futex just by touching bits in a processor > register - the whole point of futex is to have lots of different > memory locations representing different locks.
You can do a single (or a few) FUTEX using "processor bits". This done you can use this dedicated FUTEX to create a critical section that protects whatever "atomic operations" are necessary to do the "real" Futexes. > > However if you can implement a "conditional-store" which depends on a > custom flag, you can clear the flag on interrupt entry or exit in the kernel. > I doubt that I can do this. Custom instructions can't access the memory (well in fact thy can but the need to use an additional bus interface that is on the other side of the CPU's cache). Moreover the condition for a failing operation would be either access to the said memory location or the occurrence of an interrupt. Neither can be detected by the "hardware" that implements the custom instruction. (OK, you can use an additional custom instruction that sets the flag you mention, and execute same it in the general ISR.) -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