此方法用于确定方法是否从运行对象的操作系统任务中调用。
特征符RiCBoolean RiCOSTask_exeOnMyTask (RiCOSTask *const me);
返回此方法返回以下某个值:
- RiCTRUE - 方法从运行对象的操作系统任务中调用。
- RiCFALSE - 调用方法的任务不同于运行对象的操作系统任务。
示例RiCBoolean RiCOSTask_exeOnMyTask(RiCOSTask * const me)
{
RiCOSHandle executedOsHandle;
RiCOSHandle myOsHandle;
RiCBoolean res;
if (me == NULL) return RiCFALSE;
/* A handle to the thread that executes the delete */
executedOsHandle = RiCOSTask_getCurrentTaskHandle();
/* A handle to ‘this' thread */
myOsHandle = RiCOSTask_getOSHandle(me);
res = ((executedOsHandle == myOsHandle) ?
RiCTRUE : RiCFALSE);
return res;
}