Use a shared input/output mutex

Replace the save mutex with a common mutex, which is locked whenever
read or write operations on the data files are performed. Also, since
this mutex is an implementation detail, mark the locking functions
static and remove them from the header file.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer
2017-09-08 20:34:37 +02:00
parent 0f3d1988bf
commit 7a0134204e
2 changed files with 23 additions and 16 deletions

View File

@@ -836,8 +836,6 @@ void ical_export_data(FILE *, int);
unsigned io_fprintln(const char *, const char *, ...);
void io_init(const char *, const char *);
void io_extract_data(char *, const char *, int);
void io_save_mutex_lock(void);
void io_save_mutex_unlock(void);
void io_dump_apts(const char *, const char *, const char *, const char *);
unsigned io_save_apts(const char *);
void io_dump_todo(const char *);