//! lève l'IT SERVER_READY sur le client passé en param. renvoie SUCCESS/ERROR int send_ready_sci(client_t *cl) { sci_error_t retval; if (cl->remote_ready_interrupt != NULL) { SCITriggerInterrupt(cl->remote_ready_interrupt, NO_FLAGS, &retval); if (retval != SCI_ERR_OK) { log_error("SCITriggerInterrupt READY failed\n"); log_error("%s\n",Sci_error(retval)); return ERROR; } log_message("IT READY triggered on cl %d\n", cl->no_sci); } else { log_error("IT ptr is NULL, can't trigger READY IT for cl %d\n", cl->no_sci); return ERROR; } return SUCCESS; }
sci_error_t SendInterrupt(sci_desc_t sd, Uint32 localAdapterNo, Uint32 localSciNodeId, Uint32 remoteSciNodeId, Uint32 interruptNo){ sci_error_t error; sci_remote_interrupt_t remoteInterrupt; Uint32 timeOut = SCI_INFINITE_TIMEOUT; // Now connect to the other sides interrupt flag do { SCIConnectInterrupt(sd, &remoteInterrupt, remoteSciNodeId, localAdapterNo, interruptNo, timeOut, NO_FLAGS, &error); } while (error != SCI_ERR_OK); if (error != SCI_ERR_OK) { fprintf(stderr, "SCIConnectInterrupt failed - Error code 0x%x\n", error); return error; } // Trigger interrupt printf("\nNode %u sent interrupt (0x%x) to node %d\n",localSciNodeId, interruptNo, remoteSciNodeId); SCITriggerInterrupt(remoteInterrupt, NO_FLAGS, &error); if (error != SCI_ERR_OK) { fprintf(stderr, "SCITriggerInterrupt failed - Error code 0x%x\n", error); return error; } // Disconnect and remove interrupts SCIDisconnectInterrupt(remoteInterrupt, NO_FLAGS, &error); if (error != SCI_ERR_OK) { fprintf(stderr, "SCIDisconnectInterrupt failed - Error code 0x%x\n", error); return error; } return error; }