Displaying 5 results from an estimated 5 matches for "watch_pipe".
2012 Dec 14
1
[PATCH V5] libxenstore: filter watch events in libxenstore when we unwatch
...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
...ff-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 Sep 19
5
[PATCH] libxenstore: filter watch events in libxenstore when we unwatch
...ATCH_TOKEN && !strcmp (token, strings)) {
+ list_del(&msg->list);
+ free(msg);
+ break;
+ }
+ strings = strings + strlen (strings) + 1;
+ }
+ }
+
+ /* Clear the pipe token if there are no more pending watches. */
+ if (list_empty(&h->watch_list) && (h->watch_pipe[0] != -1)) {
+ while (read(h->watch_pipe[0], &c, 1) != 1)
+ continue;
+ }
+
+ mutex_unlock(&h->watch_mutex);
+
+ return res;
}
/* Start a transaction: changes by others will not be seen during this
--
Julien Grall
2012 Dec 13
4
[PATCH V3] libxenstore: filter watch events in libxenstore when we unwatch
...ng 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 ++++++++++++++++++++++++++++++...
2012 Sep 25
2
[PATCH V2] libxenstore: filter watch events in libxenstore when we unwatch
.../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 a...