Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2:ARM
xen
24232-waitqueue_Hold_a_reference_to_a_domain_on...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 24232-waitqueue_Hold_a_reference_to_a_domain_on_a_waitqueue..patch of Package xen
changeset: 24232:95d4e2e0bed3 user: Keir Fraser <keir@xen.org> date: Fri Nov 25 20:32:05 2011 +0000 files: xen/common/wait.c xen/include/xen/wait.h description: waitqueue: Hold a reference to a domain on a waitqueue. Also allow waitqueues to be dynamically destroyed. Signed-off-by: Keir Fraser <keir@xen.org> --- xen/common/wait.c | 8 ++++++++ xen/include/xen/wait.h | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) Index: xen-4.1.2-testing/xen/common/wait.c =================================================================== --- xen-4.1.2-testing.orig/xen/common/wait.c +++ xen-4.1.2-testing/xen/common/wait.c @@ -87,6 +87,11 @@ void init_waitqueue_head(struct waitqueu INIT_LIST_HEAD(&wq->list); } +void destroy_waitqueue_head(struct waitqueue_head *wq) +{ + wake_up_all(wq); +} + void wake_up_nr(struct waitqueue_head *wq, unsigned int nr) { struct waitqueue_vcpu *wqv; @@ -98,6 +103,7 @@ void wake_up_nr(struct waitqueue_head *w wqv = list_entry(wq->list.next, struct waitqueue_vcpu, list); list_del_init(&wqv->list); vcpu_unpause(wqv->vcpu); + put_domain(wqv->vcpu->domain); } spin_unlock(&wq->lock); @@ -218,6 +224,7 @@ void prepare_to_wait(struct waitqueue_he spin_lock(&wq->lock); list_add_tail(&wqv->list, &wq->list); vcpu_pause_nosync(curr); + get_knownalive_domain(curr->domain); spin_unlock(&wq->lock); } @@ -236,6 +243,7 @@ void finish_wait(struct waitqueue_head * { list_del_init(&wqv->list); vcpu_unpause(curr); + put_domain(curr->domain); } spin_unlock(&wq->lock); } Index: xen-4.1.2-testing/xen/include/xen/wait.h =================================================================== --- xen-4.1.2-testing.orig/xen/include/xen/wait.h +++ xen-4.1.2-testing/xen/include/xen/wait.h @@ -25,8 +25,9 @@ struct waitqueue_head { .list = LIST_HEAD_INIT((name).list) \ } -/* Dynamically initialise a waitqueue. */ +/* Dynamically initialise/destroy a waitqueue. */ void init_waitqueue_head(struct waitqueue_head *wq); +void destroy_waitqueue_head(struct waitqueue_head *wq); /* Wake VCPU(s) waiting on specified waitqueue. */ void wake_up_nr(struct waitqueue_head *wq, unsigned int nr);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor