|
clsync
|
#include "common.h"#include "error.h"#include "sync.h"#include "indexes.h"#include "privileged.h"#include <pthread.h>#include <gio/gio.h>#include "mon_gio.h"
Go to the source code of this file.
Data Structures | |
| struct | filemondata |
| struct | event |
Macros | |
| #define | INFINITETIME (3600 * 24 * 365 * 10) /* ~10 years */ |
Typedefs | |
| typedef struct filemondata | filemondata_t |
| typedef struct event | event_t |
Functions | |
| static void | event_free (event_t *ev) |
| static int | event_push (char *path, gulong handle_id, GFileMonitorEvent event, eventobjtype_t objtype_event, eventobjtype_t objtype_old, eventobjtype_t objtype_new) |
| static event_t * | event_pop () |
| static void | dir_gotevent (GFileMonitor *filemon, GFile *file, GFile *file_other, GFileMonitorEvent event, gpointer arg) |
| int | gio_add_watch_dir (ctx_t *ctx_p, indexes_t *indexes_p, const char *const accpath) |
| void * | g_iteration_stop (void *_timeout_p) |
| static int | gio_wait_now (ctx_t *ctx_p, struct indexes *indexes_p, struct timeval *tv_p) |
| int | gio_wait (ctx_t *ctx_p, struct indexes *indexes_p, struct timeval *tv_p) |
| int | gio_handle (ctx_t *ctx_p, indexes_t *indexes_p) |
| void | free_filemondat (void *_fmdat) |
| int | gio_init (ctx_t *ctx_p) |
| int | gio_deinit (ctx_t *ctx_p) |
Variables | |
| GHashTable * | mondirs_ht |
| pthread_spinlock_t | queue_lock |
| pthread_mutex_t | gio_mutex_prefetcher = PTHREAD_MUTEX_INITIALIZER |
| pthread_cond_t | gio_cond_gotevent = PTHREAD_COND_INITIALIZER |
| event_t * | queue = NULL |
| int | queue_length |
| int | queue_alloc |
| int | cancel_g_iteration_stop |
| pthread_t | thread_g_iteration_stop |
| GMainLoop * | gio_loop = NULL |
| #define INFINITETIME (3600 * 24 * 365 * 10) /* ~10 years */ |
| typedef struct filemondata filemondata_t |
|
static |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| void free_filemondat | ( | void * | _fmdat | ) |
| void * g_iteration_stop | ( | void * | _timeout_p | ) |
| int gio_add_watch_dir | ( | ctx_t * | ctx_p, |
| indexes_t * | indexes_p, | ||
| const char *const | accpath ) |
| int gio_deinit | ( | ctx_t * | ctx_p | ) |
| int gio_handle | ( | ctx_t * | ctx_p, |
| indexes_t * | indexes_p ) |
| int gio_init | ( | ctx_t * | ctx_p | ) |
| pthread_cond_t gio_cond_gotevent = PTHREAD_COND_INITIALIZER |
| pthread_mutex_t gio_mutex_prefetcher = PTHREAD_MUTEX_INITIALIZER |