hi TI-friends,
I want to clarify the difference between Vps_printf and Vps_rprintf. But I can't get any idea although I got the following. Could you explain this for us?
int Vps_printf(char *format, ...)
{
int retVal;
va_list vaArgPtr;
char *buf = NULL;
UInt32 cookie;
cookie = Hwi_disable();
buf = &gRemoteDebug_serverObj.printBuf[0];
va_start(vaArgPtr, format);
vsnprintf(buf, REMOTE_DEBUG_SERVER_PRINT_BUF_LEN, format, vaArgPtr);
va_end(vaArgPtr);
retVal = RemoteDebug_serverPutString(gRemoteDebug_serverObj.coreId, buf);
Hwi_restore(cookie);
if (BIOS_getThreadType() == BIOS_ThreadType_Task) => here're difference. but what's the meaning??
{
/* Printf should be called only from Task context as it does pend.
* Calling from other context will cause exception
*/
System_printf(buf);
}
return (retVal);
}
int Vps_rprintf(char *format, ...)
{
int retVal;
va_list vaArgPtr;
char *buf = NULL;
UInt32 cookie;
cookie = Hwi_disable();
buf = &gRemoteDebug_serverObj.printBuf[0];
va_start(vaArgPtr, format);
vsnprintf(buf, REMOTE_DEBUG_SERVER_PRINT_BUF_LEN, format, vaArgPtr);
va_end(vaArgPtr);
retVal = RemoteDebug_serverPutString(gRemoteDebug_serverObj.coreId, buf);
Hwi_restore(cookie);
return (retVal);
}