summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/timer.h')
-rw-r--r--libglusterfs/src/timer.h43
1 files changed, 20 insertions, 23 deletions
diff --git a/libglusterfs/src/timer.h b/libglusterfs/src/timer.h
index 32b246cf00d..216fc65144a 100644
--- a/libglusterfs/src/timer.h
+++ b/libglusterfs/src/timer.h
@@ -16,43 +16,40 @@
#include <sys/time.h>
#include <pthread.h>
-typedef void (*gf_timer_cbk_t) (void *);
+typedef void (*gf_timer_cbk_t)(void *);
struct _gf_timer {
- union {
- struct list_head list;
- struct {
- struct _gf_timer *next;
- struct _gf_timer *prev;
- };
+ union {
+ struct list_head list;
+ struct {
+ struct _gf_timer *next;
+ struct _gf_timer *prev;
};
- struct timespec at;
- gf_timer_cbk_t callbk;
- void *data;
- xlator_t *xl;
- gf_boolean_t fired;
+ };
+ struct timespec at;
+ gf_timer_cbk_t callbk;
+ void *data;
+ xlator_t *xl;
+ gf_boolean_t fired;
};
struct _gf_timer_registry {
- pthread_t th;
- char fin;
- struct list_head active;
- gf_lock_t lock;
+ pthread_t th;
+ char fin;
+ struct list_head active;
+ gf_lock_t lock;
};
typedef struct _gf_timer gf_timer_t;
typedef struct _gf_timer_registry gf_timer_registry_t;
gf_timer_t *
-gf_timer_call_after (glusterfs_ctx_t *ctx,
- struct timespec delta,
- gf_timer_cbk_t cbk,
- void *data);
+gf_timer_call_after(glusterfs_ctx_t *ctx, struct timespec delta,
+ gf_timer_cbk_t cbk, void *data);
int32_t
-gf_timer_call_cancel (glusterfs_ctx_t *ctx,
- gf_timer_t *event);
+gf_timer_call_cancel(glusterfs_ctx_t *ctx, gf_timer_t *event);
void
-gf_timer_registry_destroy (glusterfs_ctx_t *ctx);
+gf_timer_registry_destroy(glusterfs_ctx_t *ctx);
#endif /* _TIMER_H */