I find _int_disable in MQX seems not disable interrupt actually. see the following codes:
_int_disable();
for(i=0;i<3;i++){
file = fopen("a:init.txt","a+");
if(file!=NULL)
break;
}
if(i==3){
return -1;
}
fseek(file,0,IO_SEEK_SET);
_bsp_serve_wdog();
i = write(file,(char*)&board_info,sizeof(board_info));
...
fclose(file);
_int_enable();
return 0;
I find other tasks can get cpu running after _int_disable, and if another task also call above codes, the synchronization trouble occur!
I don't understand what you really want, function _int_disable() do not mask all interrupts (it is not global interrupt mask like cpsid i) but changing BASEPRI only. This means, you can have high priority interrupts which can't be disabled with _int_disable() but be careful, this high priority interrupt can't call any MQX function.