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.

在CCS环境下使用OpenMP中的critical制导指令的name部分问题



在我尝试使用OpenMP中的critical制导指令时,其格式本应该是

#pragma omp critical [(name)]
{需要保护的代码段}

在我看到的书籍和标准中,"(name)"应该可以是随意取名的,但当我直接使用

#pragma omp critical (a_name)

时会报错

但如果我在之前定义了

int a_name

的话就可以通过了

Compiler version:TI v7.4.2

OpenMP BIOS runtime library:1.1.3.02

已点选"Enable support for OpenMP 3.0"

请问是否有人遇到过这样的问题?或是我个人的理解有误?

谢谢相关解答.