mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
treewide: improve mutex handling
- Add dawn_mutex_require() to indicate when code is accessing resources - Use pthread_mutex_trylock() to actively test required mutex are locked [cleanup commit message] Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
parent
32d6d6d57d
commit
60ea5b4daf
6 changed files with 200 additions and 36 deletions
|
|
@ -11,6 +11,18 @@
|
|||
#include "test_storage.h"
|
||||
|
||||
/*** Test Stub Functions - Called by SUT ***/
|
||||
|
||||
// It is an accident of Uni* / C history that the below is not stubbed in libc...
|
||||
int pthread_mutex_trylock(pthread_mutex_t* m)
|
||||
{
|
||||
return EBUSY; // Tell SUT that it was locked, so no errors, warnings, etc
|
||||
}
|
||||
|
||||
void ubus_set_nr_from_clients(struct kicking_nr* ap_list) {
|
||||
printf("ubus_set_nr_from_clients() was called...\n");
|
||||
}
|
||||
|
||||
|
||||
void ubus_send_beacon_request(client *c, ap *a, int id)
|
||||
{
|
||||
printf("ubus_send_beacon_request() was called...\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue