This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于6678多核数据共享问题



在多个核采用同一工程中,定义并初始化全局变量

#pragma DATA_SECTION(sharedata, ".data1")
int sharedata [10]={1,1,1,1,1,1,1,1,1,1};

程序中 core0 重新写入sharedata: for(i=0;i<10;i++)      sharedata[i]=2;

 

接着core1  读入并输出sharedata: for(i=0;i<10;i++)        {    System_printf("sharedata[i] = %d\n", sharedata[i]);}

 

结果输出的值仍为初始化值1,而并不是core0写入的新值2,请问这是为什么呢,有什么办法可以解决的吗?