Forum Discussion
Altera_Forum
Honored Contributor
22 years agoNios Semaphore?
I need a good semaphore to make a fifo IRQ safe. On the PC it's easy with the assembly instruction BTS which Bit Tests and Sets. So you can try to set a bit and know if you did it in a single c...
Altera_Forum
Honored Contributor
22 years agoSCS,
Good point. I thought of that but took the easy way http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif I wrote the function that tells me if interrupts are dissabled and ran for awhile. Since they were never disabled I knew it would be safe to blindly disable/enable. Sloppy. I'll put in the code to restore the state. Thanks! Ken