git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11354 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
isiora 2018-01-19 15:40:17 +00:00
parent 1352272d16
commit eecc433c7f
1 changed files with 6 additions and 1 deletions

View File

@ -78,7 +78,8 @@ static void smcReleaseService(smc_service_t *svc_handle) {
rop = chFactoryFindObjectByPointer(svc_handle); rop = chFactoryFindObjectByPointer(svc_handle);
if (rop == NULL) if (rop == NULL)
return; return;
chFactoryReleaseObject(rop); chFactoryReleaseObject(rop); /* our ref */
chFactoryReleaseObject(rop); /* original ref */
} }
#endif #endif
@ -182,6 +183,10 @@ msg_t smcServiceWaitRequest(smc_service_t *svcp)
chDbgCheck(svcp != NULL); chDbgCheck(svcp != NULL);
chSysLock(); chSysLock();
if (_ns_thread) {
/* Ack previous service invocation */
chThdResumeI(&_ns_thread, MSG_OK);
}
r = chThdSuspendTimeoutS(&svcp->svct, TIME_INFINITE); r = chThdSuspendTimeoutS(&svcp->svct, TIME_INFINITE);
chSysUnlock(); chSysUnlock();
return r; return r;