#if (OS_EVENT_NAME_SIZE > 1) || (OS_FLAG_NAME_SIZE > 1) || (OS_MEM_NAME_SIZE > 1) || (OS_TASK_NAME_SIZE > 1) || (OS_TMR_CFG_NAME_SIZE > 1)
INT8U OS_StrCopy (INT8U *pdest, INT8U *psrc)
{
INT8U len;
len = 0;
while (*psrc != OS_ASCII_NUL) {
*pdest++ = *psrc++;
len++;
}
*pdest = OS_ASCII_NUL;
return (len);
}
#endif
这个函数是不是可重入的呢?我认为是可重入的,但在ucos ii中每次调用该函数时,都有如下形式:
OS_ENTER_CRITICAL();
len = OS_StrCopy(pname, pevent->OSEventName); /* Copy name from OS_EVENT */
OS_EXIT_CRITICAL(); |