各位专家好 我在main函数开始的地方定义了 变量coreID=读取寄存器DNUM 的值 ,然后再后面代码中根据coreID进行代码的分支处理 可是出现一个问题 ,比如core0先执行switch(coreID)正确 ,然后core1也执行switch(coreID)正确 ,最后运行core0时 ,程序就跑到了core1的代码中 ,如果一开始就让两个核一起运行 ,则程序就运行不下去 一直run 没打印输出 ,请问怎么回事,怎么判断coreID最好? 在每次比较之前都读取DUNM的值吗?谢谢
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.
各位专家好 我在main函数开始的地方定义了 变量coreID=读取寄存器DNUM 的值 ,然后再后面代码中根据coreID进行代码的分支处理 可是出现一个问题 ,比如core0先执行switch(coreID)正确 ,然后core1也执行switch(coreID)正确 ,最后运行core0时 ,程序就跑到了core1的代码中 ,如果一开始就让两个核一起运行 ,则程序就运行不下去 一直run 没打印输出 ,请问怎么回事,怎么判断coreID最好? 在每次比较之前都读取DUNM的值吗?谢谢