Fixed problem causing a failure to obtain the shared memory lock on the AppsProc.

This commit is contained in:
jwilson
2016-02-17 20:03:15 -08:00
committed by Julian Oes
parent 4adfea7fa9
commit 75fad09263
6 changed files with 25 additions and 76 deletions
+2 -8
View File
@@ -33,9 +33,6 @@
*
****************************************************************************/
// TODO-JYW: TESTING-TESTING
#define DEBUG_BUILD 1
/**
* @file param.c
*
@@ -113,7 +110,7 @@ const int bits_per_allocation_unit = (sizeof(*param_changed_storage) * 8);
//#define ENABLE_SHMEM_DEBUG
extern int get_shmem_lock(void);
extern int get_shmem_lock(const char *caller_file_name, int caller_line_number);
extern void release_shmem_lock(void);
struct param_wbuf_s *param_find_changed(param_t param);
@@ -257,9 +254,6 @@ param_notify_changes(bool is_saved)
{
struct parameter_update_s pup = { .timestamp = hrt_absolute_time(), .saved = is_saved };
// TODO-JYW: TESTING-TESTING:
warnx("param_notify_changes: notifying of changes, timestamp: %lld, is_saved: %d", pup.timestamp, pup.saved);
/*
* If we don't have a handle to our topic, create one now; otherwise
* just publish.
@@ -822,7 +816,7 @@ param_save_default(void)
const char *filename = param_get_default_file();
if (get_shmem_lock() != 0) {
if (get_shmem_lock(__FILE__, __LINE__) != 0) {
PX4_ERR("Could not get shmem lock\n");
res = ERROR;
goto exit;