Skip to contentSkip to conversation

How to use XS_WATCH in

DISCUSSION 胡少龙 1 participant 1 message Sep 5, 2010

lore
Share & tools
lore

胡少龙

author
#0 lore raw

Hi,

I want to know how to use XS_WATCH, i assume first i do as fellow:

struct xsd_sockmsg msg;
msg.type=XS_WATCH;

write_request((char*)msg, sizeof(msg));
write_request(path, path_length);

struct evtchn_send event; event.port=xenstore_event; hypercall_event_channel_op(EVTCHNOP_send, &event);

after that, what should i do? does it just block in hypercall_event_channel_op() until the value in xenstore specified by path is changed , and when it return ,i can read the changed value by the responds msg?