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!