DataFlash: don't fsync on SITL

this makes it much faster on virtual machines
This commit is contained in:
Andrew Tridgell 2014-01-14 12:40:41 +11:00
parent b4b66210ff
commit f6db03dfb0

View File

@ -578,7 +578,9 @@ void DataFlash_File::_io_timer(void)
chunk, ensuring the directory entry is updated after each chunk, ensuring the directory entry is updated after each
write. write.
*/ */
#if CONFIG_HAL_BOARD != HAL_BOARD_AVR_SITL
::fsync(_write_fd); ::fsync(_write_fd);
#endif
BUF_ADVANCEHEAD(_writebuf, nwritten); BUF_ADVANCEHEAD(_writebuf, nwritten);
} }
perf_end(_perf_write); perf_end(_perf_write);