aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/xenstored_watch.h
diff options
context:
space:
mode:
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-06-17 10:24:34 +0000
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-06-17 10:24:34 +0000
commit4ddc54b2db6264de8a8809d2a8763c5f4e3f4191 (patch)
tree22569f709abb8a9b21f17bfe9c39471bc89a8cc8 /tools/xenstore/xenstored_watch.h
parentc364cd9e1add6131c74a2507ea81ed556b0c0842 (diff)
downloadxen-4ddc54b2db6264de8a8809d2a8763c5f4e3f4191.tar.gz
xen-4ddc54b2db6264de8a8809d2a8763c5f4e3f4191.tar.bz2
xen-4ddc54b2db6264de8a8809d2a8763c5f4e3f4191.zip
bitkeeper revision 1.1713.3.5 (42b2a4e2r6SNlC_nq2hAkXEQjEFAmA)
Many files: - watch now takes a token, returned when reading watch - More tests - Fix domain shared page communication (flush output) - Add "home" path for domains - More permissions checks in various functions - Simplify watch acknowledgement code and fix occasional bug xs_watch_stress.c, 12readonly.sh, 11domain-watch.sh, 10domain-homedir.sh: new file xs_stress.c, xs_lib.h, xs_lib.c: Cleanup whitespace. ignore: Add tools/xenstore/xs_watch_stress Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Diffstat (limited to 'tools/xenstore/xenstored_watch.h')
-rw-r--r--tools/xenstore/xenstored_watch.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/tools/xenstore/xenstored_watch.h b/tools/xenstore/xenstored_watch.h
index 656ce4c36b..e9c0ad8f0b 100644
--- a/tools/xenstore/xenstored_watch.h
+++ b/tools/xenstore/xenstored_watch.h
@@ -16,13 +16,15 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+
#ifndef _XENSTORED_WATCH_H
#define _XENSTORED_WATCH_H
+
#include "xenstored_core.h"
bool do_watch(struct connection *conn, struct buffered_data *in);
-bool do_watch_ack(struct connection *conn);
-bool do_unwatch(struct connection *conn, const char *node);
+bool do_watch_ack(struct connection *conn, const char *token);
+bool do_unwatch(struct connection *conn, struct buffered_data *in);
/* Is this a watch event message for this connection? */
bool is_watch_event(struct connection *conn, struct buffered_data *out);
@@ -30,13 +32,15 @@ bool is_watch_event(struct connection *conn, struct buffered_data *out);
/* Look through our watches: if any of them have an event, queue it. */
void queue_next_event(struct connection *conn);
-/* Is this connection waiting for a watch acknowledgement? */
-bool waiting_for_ack(struct connection *conn);
-
-/* Reset event if we were sending one */
-void reset_watch_event(struct connection *conn);
-
/* Fire all watches. */
void fire_watches(struct transaction *trans, const char *node);
+/* Find shortest timeout: if any, reduce tv (may already be set). */
+void shortest_watch_ack_timeout(struct timeval *tv);
+
+/* Check for watches which may have timed out. */
+void check_watch_ack_timeout(void);
+
+void dump_watches(struct connection *conn);
+
#endif /* _XENSTORED_WATCH_H */