CERN org.glite.Gfal  2.0.1
/builddir/build/BUILD/gfal2-2.0.0/src/externals/gwatchdog/gwatchdog.h
00001 #pragma once
00002 
00009 #include <glib.h> 
00010  
00011 typedef struct _GWatchdog{
00012         GTimer* time;
00013         int duration;
00014         gpointer data;
00015         GThreadFunc func;
00016         GMutex* mutex;
00017         gboolean started;
00018         gboolean cancel;
00019         GThread* thread;
00020  } GWatchdog;
00021  
00022  
00023  
00024 GWatchdog* gwatchdog_new(gint64 duration, GThreadFunc func, gpointer data);
00025 
00026 
00027 int gwatchdog_start(GWatchdog* dog);
00028 
00029 int gwatchdog_extend(GWatchdog* dog, int duration);
00030 
00031 
00032 void gwatchdog_delete(GWatchdog* dog);