errors xeon_phi XEON_PHI_ERR_ {
failure MGR_REGISTER_FAILED "Registration with the Xeon Phi Manager failed",
failure MGR_MAX_CARDS "There are too much drivers connected",
+ failure MSG_NOT_REACHABLE "There is not connection to that Xeon Phi",
failure MSG_NOT_INITIALIZED "Messaging service has not been initialized",
failure DMA_NOT_INITIALIZED "DMA library has not been initialized",
+ failure DMA_NUM_DESC "Descriptor number must be a power of two",
failure DMA_ID_NOT_EXISTS "The DMA transfer with that ID does not exist ",
failure DMA_NOT_SUPPORTED "The DMA transfer is not supported.",
failure DMA_BUSY "All DMA channels are busy",
assert(xphi < XEON_PHI_NUM_MAX);
XMESSAGING_DEBUG("Sending OPEN message [%u] -> [%u]\n", xeon_phi->id, xphi);
+ if (xeon_phi->topology[xphi].msg == NULL) {
+ return XEON_PHI_ERR_MSG_NOT_REACHABLE;
+ }
- assert(xeon_phi->topology[xphi].msg);
struct xnode *node = &xeon_phi->topology[xphi];
if (node->state != XNODE_STATE_READY) {
return -1; //TODO: error code