AP_Filesystem: use a recursive semaphore

this is needed to cope with the mkdir("/APM") in sdcard_retry()
This commit is contained in:
Andrew Tridgell committed 2019-09-06 08:51:04 +10:00
1 parent 7afd51d03e
commit b72dcf6478
1 file changed
+3 -2
@@ -24,8 +24,9 @@ static bool remount_needed;
#define FATFS_X (S_IXUSR | S_IXGRP | S_IXOTH) /*< FatFs Execute perms */
// use a semaphore to ensure that only one filesystem operation is
// happening at a time
static HAL_Semaphore sem;
// happening at a time. A recursive semaphore is used to cope with the
// mkdir() inside sdcard_retry()
static HAL_Semaphore_Recursive sem;
typedef struct {
FIL *fh;