Displaying 4 results from an estimated 4 matches for "xs_clear_watch_pip".
Did you mean:
xs_clear_watch_pipe
2012 Sep 25
2
[PATCH V2] libxenstore: filter watch events in libxenstore when we unwatch
.../xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -753,6 +753,19 @@ bool xs_watch(struct xs_handle *h, const char *path, const char *token)
ARRAY_SIZE(iov), NULL));
}
+
+/* Clear the pipe token if there are no more pending watchs.
+ * We suppose the watch_mutex is already taken.
+ */
+static void xs_clear_watch_pipe(struct xs_handle *h)
+{
+ char c;
+
+ if (list_empty(&h->watch_list) && (h->watch_pipe[0] != -1))
+ while (read(h->watch_pipe[0], &c, 1) != 1)
+ continue;
+}
+
/* Find out what node change was on (will block if nothing pending).
* Returns array of two pointers: path...
2012 Dec 14
1
[PATCH V5] libxenstore: filter watch events in libxenstore when we unwatch
...n V4 and V5:
- Use tab instead of space for the indentation.
Modifications between V3 and V4:
- Rename XS_UNWATCH_SAFE to XS_UNWATCH_FILTER;
- Improve documentation;
- Fix sub-path checking in xs_unwatch.
Modifications between V2 and V3:
- Add XS_UNWATCH_SAFE;
- Rename xs_clear_watch_pipe to xs_maybe_clear_watch_pipe.
Modifications between V1 and V2:
- Add xs_clear_watch_pipe to avoid code duplication;
- Modify commit message by Ian Jackson;
- Rework list filtering.
tools/xenstore/xenstore.h | 21 ++++++++++++
tools/xenstore/xs.c | 84 +++++++++++++++++++++...
2012 Dec 14
1
[PATCH V4] libxenstore: filter watch events in libxenstore when we unwatch
...Signed-off-by: Julien Grall <julien.grall@citrix.com>
---
Modifications between V3 and V4:
- Rename XS_UNWATCH_SAFE to XS_UNWATCH_FILTER;
- Improve documentation;
- Fix sub-path checking in xs_unwatch.
Modifications between V2 and V3:
- Add XS_UNWATCH_SAFE;
- Rename xs_clear_watch_pipe to xs_maybe_clear_watch_pipe.
Modifications between V1 and V2:
- Add xs_clear_watch_pipe to avoid code duplication;
- Modify commit message by Ian Jackson;
- Rework list filtering.
tools/xenstore/xenstore.h | 21 ++++++++++++
tools/xenstore/xs.c | 84 ++++++++++++++++++++...
2012 Dec 13
4
[PATCH V3] libxenstore: filter watch events in libxenstore when we unwatch
...ation using libXenStore, this behaviour
will only be enabled if XS_UNWATCH_SAFE is give to xs_open.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Julien Grall <julien.grall@citrix.com>
---
Modification between V2 and V3:
- Add XS_UNWATCH_SAFE;
- Rename xs_clear_watch_pipe to xs_maybe_clear_watch_pipe.
Modification between V1 and V2:
- Add xs_clear_watch_pipe to avoid code duplication;
- Modify commit message by Ian Jackson;
- Rework list filtering.
tools/xenstore/xenstore.h | 7 ++++
tools/xenstore/xs.c | 86 +++++++++++++++++++++++++++++...