index 40a6b54c7d11a9919413c3833a9d6d2afce810a0..fb4a180061dc1f3b83d3ed7192f21aa417250952 100644 (file)
/*
- * Copyright (c) 2011-2013, Texas Instruments Incorporated
+ * Copyright (c) 2011-2014, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include <xdc/runtime/knl/Thread.h>
#include <xdc/runtime/System.h>
+#include <ti/sysbios/knl/Task.h>
+
#define MSGBUFFERSIZE 512 /* Make global and move to RPMessage.h */
#if defined(RCM_ti_ipc)
_strcpy(slot->name, funcName);
slot->key = RcmServer_getNextKey_P(obj);
- fxnIdx = (slot->key << _RCM_KeyShift) | (i << 12) | j;
+ fxnIdx = ((UInt32)(slot->key) << _RCM_KeyShift) | (i << 12) | j;
}
/* error, no more room to add new symbol */
System_printf("RcmServer_execMsg_I: Calling fxnIdx: %d\n",
(msg->fxnIdx & 0x0000FFFF));
#endif
+ Task_setEnv(Task_self(), (Ptr)RcmServer_getLocalAddress(obj));
#if USE_RPMESSAGE
if (createFxn) {
msg->result = (*createFxn)(obj, msg->dataSize, msg->data);
#else
msg->result = (*fxn)(msg->dataSize, msg->data);
#endif
+ Task_setEnv(Task_self(), NULL);
}
return(status);
if (i == 0) {
fxnIdx = 0x80000000 | j;
} else {
- fxnIdx = (slot->key << _RCM_KeyShift) | (i << 12) | j;
+ fxnIdx = ((UInt32)(slot->key) << _RCM_KeyShift) |
+ (i << 12) | j;
}
break;
}
"from: %d\n",
len, obj->replyAddr);
- System_printf("hdr - t:%d f:%d l:%d\n", packet->hdr.type,
- packet->hdr.flags, packet->hdr.len);
+ System_printf("hdr - t:%d l:%d\n", packet->hdr.type,
+ packet->hdr.len);
System_printf("pkt - d:%d m:%d\n", packet->desc, packet->msgId);
#endif
if (packet->hdr.type == OMX_DISC_REQ) {
System_printf("RcmServer_serverThrFxn_P: Got OMX_DISCONNECT\n");
}
- Assert_isTrue((len <= MSGBUFFERSIZE), NULL);
- Assert_isTrue((packet->hdr.type == OMX_RAW_MSG) ||
- (packet->hdr.type == OMX_DISC_REQ) , NULL);
+ if (!obj->shutdown) {
+ Assert_isTrue((len <= MSGBUFFERSIZE), NULL);
+ Assert_isTrue((packet->hdr.type == OMX_RAW_MSG) ||
+ (packet->hdr.type == OMX_DISC_REQ) , NULL);
+ }
if ((rval < 0) && (rval != RPMessage_E_UNBLOCKED)) {
#else