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.

C6678 semaphore

Other Parts Discussed in Thread: SYSBIOS

您好,.cfg文件如下

var System = xdc.useModule('xdc.runtime.System');
var SysStd = xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy = SysStd;

var BIOS = xdc.useModule('ti.sysbios.BIOS');
BIOS.heapSize = 0x10000000;//256M
BIOS.libType = BIOS.LibType_Custom;

var Settings = xdc.useModule('ti.sysbios.posix.Settings');
Settings.supportsMutexPriority = true;

var Clock = xdc.useModule('ti.sysbios.knl.Clock');
var Swi = xdc.useModule('ti.sysbios.knl.Swi');
var Task = xdc.useModule('ti.sysbios.knl.Task');
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
//Create a task for all cores
var task0Params = new Task.Params();
task0Params.instance.name = "task0";
task0Params.stackSize = 4194304;//4M
Program.global.task0 = Task.create("&taskallcore_func", task0Params);

//Create a semaphore with count 0
var semaphore0Params = new Semaphore.Params();
semaphore0Params.instance.name = "semaphore0";
Program.global.semaphore0 = Semaphore.create(null, semaphore0Params);

var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
var Notify = xdc.useModule('ti.sdo.ipc.Notify');
var MessageQ = xdc.useModule('ti.sdo.ipc.MessageQ');
var HeapBufMP = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');

var nameList = MultiProc.getDeviceProcNames();
MultiProc.setConfig(null, nameList);

Ipc.procSync = Ipc.ProcSync_PAIR;

配置文件里面已近新建了信号量semaphore0,但是在源文件中引用的时候,还是提示semaphore0没有定义,编译不能通过,但是task0确实可以编译通过的,请问是什么原因,谢谢!