Lock name should not equal locking function name. Urr.

This commit is contained in:
px4dev
2013-09-18 22:40:07 -07:00
parent a9de6149da
commit 978a234d29

View File

@@ -96,20 +96,20 @@ ORB_DEFINE(parameter_update, struct parameter_update_s);
/** parameter update topic handle */
static orb_advert_t param_topic = -1;
static sem_t param_lock = { .semcount = 1 };
static sem_t param_sem = { .semcount = 1 };
/** lock the parameter store */
static void
param_lock(void)
{
do {} while (sem_wait(&param_lock) != 0);
do {} while (sem_wait(&param_sem) != 0);
}
/** unlock the parameter store */
static void
param_unlock(void)
{
sem_post(&param_lock);
sem_post(&param_sem);
}
/** assert that the parameter store is locked */