Skip to content

Commit

Permalink
Merge pull request #716 from fjtrujy/fixSemSIF
Browse files Browse the repository at this point in the history
Delete semaphore on E_SIF_PKT_SEND error
  • Loading branch information
uyjulian authored Jan 11, 2025
2 parents 2e3825f + e94acaa commit bc22eb7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ee/kernel/src/sifrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ int SifBindRpc(SifRpcClientData_t *cd, int sid, int mode)

if (!SifSendCmd(SIF_CMD_RPC_BIND, bind, RPC_PACKET_SIZE, NULL, NULL, 0)) {
rpc_packet_free(bind);
DeleteSema(cd->hdr.sema_id);
return -E_SIF_PKT_SEND;
}

Expand Down Expand Up @@ -214,6 +215,7 @@ int SifCallRpc(SifRpcClientData_t *cd, int rpc_number, int mode,

if (!SifSendCmd(SIF_CMD_RPC_CALL, call, RPC_PACKET_SIZE, sendbuf, cd->buff, ssize)) {
rpc_packet_free(call);
DeleteSema(cd->hdr.sema_id);
return -E_SIF_PKT_SEND;
}

Expand Down Expand Up @@ -263,6 +265,7 @@ int SifRpcGetOtherData(SifRpcReceiveData_t *rd, void *src, void *dest,

if (!SifSendCmd(SIF_CMD_RPC_RDATA, other, RPC_PACKET_SIZE, NULL, NULL, 0)) {
rpc_packet_free(other);
DeleteSema(rd->hdr.sema_id);
return -E_SIF_PKT_SEND;
}

Expand Down

0 comments on commit bc22eb7

Please sign in to comment.