Pubsub core api feature (#174)
* fixed inline functions for modern C standart * pubsub api, base version * basic test for pubsub * update applications.mk, add test file * more test for pubsub * remove unimplemented files, cleanup header file * remove legacy tests, check unsubscribe not call cb * implement deleting mutex, fail test * release mutex before deleting Co-authored-by: aanper <mail@s3f.ru>
This commit is contained in:
@@ -253,3 +253,15 @@ osStatus_t osMutexRelease (osMutexId_t mutex_id) {
|
||||
return osError;
|
||||
}
|
||||
}
|
||||
|
||||
osStatus_t osMutexDelete (osMutexId_t mutex_id) {
|
||||
osMutexRelease(mutex_id);
|
||||
|
||||
int res = 0;
|
||||
if((res = pthread_mutex_destroy(&mutex_id->mutex)) == 0) {
|
||||
return osOK;
|
||||
} else {
|
||||
printf("res = %d\n", res);
|
||||
return osError;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user