Forum Discussion
Altera_Forum
Honored Contributor
15 years agoAs said, Futex supposedly is not implemented, so debugging does not make any sense.
If you want to help implementing "atomic region" to allow for implementing Futex, please talk to Thomas Chou (AKA Hippo) about this, as he suggested this solution, did some investigations and found that a similar solution is implemented in the Blackfin uClinux distribution. Futex does need atomic instructions to work. If you found an implementation that does not, it supposedly is not workable. I don't see any other pure software way to allow for atomic instructions than doing the "atomic region" trick (please see the backlog of the uClinux-Nios mailing list for more infos on this). We do hope for Altera to implement some kind of atomic user space instructions some day, but I did not yet see any info if they will do so. Why are you using Futiex in your code, anyway ? The normal way of using FUTEX is calling pthread_muutex_??() in libc. This will do Futex if the distribution supports it and use an OS based mutex, if Futex is not available. When trying to use a Futex system call in your user land program you need to do the management of the Futex variable in your own code before. This needs to be done with atomic user land instructions I don't suppose you can do this with the current distribution (See the Article "Futxes are tricky" that you easily should find in the Internet.) -Michael (BTW, this issue is the main reason why I stopped doing active development on NIOS.)