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 2019-09-06 07:38:21 +10:00
parent 7afd51d03e
commit b72dcf6478

View File

@ -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;