XMMS2
Macros | Enumerations | Functions
log.c File Reference
#include "s4_priv.h"
#include "logging.h"
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>

Macros

#define LOG_SIZE   (2*1024*1024)
 

Enumerations

enum  log_type_t {
  LOG_ENTRY_ADD = 0xaddadd, LOG_ENTRY_DEL = 0xde1e7e, LOG_ENTRY_WRAP = 0x123123, LOG_ENTRY_INIT = 0x87654321,
  LOG_ENTRY_BEGIN = 0x1, LOG_ENTRY_END = 0x2, LOG_ENTRY_WRITING = 0x3, LOG_ENTRY_CHECKPOINT = 0x4
}
 

Functions

s4_log_data_t_log_create_data ()
 
void _log_free_data (s4_log_data_t *data)
 
void _log_checkpoint (s4_t *s4)
 Writes a checkpoint entry to the log, marking that the database has finished being written to disk. More...
 
int _log_write (oplist_t *list)
 Writes all the operations in an oplist to disk. More...
 
int _log_open (s4_t *s4)
 Opens a log file. More...
 
int _log_close (s4_t *s4)
 Closes the log file. More...
 
void _log_lock_file (s4_t *s4)
 Locks the log file. More...
 
void _log_unlock_file (s4_t *s4)
 Unlocks the log file. More...
 
void _log_lock_db (s4_t *s4)
 Locks the database file. More...
 
void _log_unlock_db (s4_t *s4)
 Unlocks the database file. More...
 
log_number_t _log_last_synced (s4_t *s4)
 
void _log_init (s4_t *s4, log_number_t last_checkpoint)