Forum Discussion
Altera_Forum
Honored Contributor
19 years ago --- Quote Start --- originally posted by kwokwong@Nov 2 2006, 10:14 PM hi all,
according the header file (d:\altera5\kits\nios2_50\bin\eclipse\plugins\com.microtronix.nios2linux.uclibc_1.4.0\include\bits\atomicity.h),
the implemented function is only stub (not really atomic!).
does anyone know how to do it really atomic?
i thought that the simplest way is to disable the interrupt when doing this function and re-enable the interrupt afterwards.
so i need to know how to enable/disable interrupt ??
regards,
kwok wong
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=19104)
--- quote end ---
--- Quote End --- It is not implemented, so we need a nios2 version in, uClibc/libc/sysdeps/linux/nios2/bits/atomicity.h Look at other arch, eg, arm,m68k,mips,i386, they use locked exchange instead of disable interrupt. Are there locked instructions in Nios2?