From: Mats Petersson Subject: [PATCH] Add documentation comment to get_domain_by_id Date: Fri, 18 Jan 2013 14:27:40 +0000 Message-ID: <1358519260-22436-2-git-send-email-mats.petersson@citrix.com> References: <1358519260-22436-1-git-send-email-mats.petersson@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1358519260-22436-1-git-send-email-mats.petersson@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Mats Petersson List-Id: xen-devel@lists.xenproject.org Signed-off-by: Mats Petersson --- xen/common/domain.c | 1 - xen/include/xen/sched.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index 07f62b3..56d95ce 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -373,7 +373,6 @@ void domain_update_node_affinity(struct domain *d) free_cpumask_var(cpumask); } - struct domain *get_domain_by_id(domid_t dom) { struct domain *d; diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 90a6537..9208c99 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -509,6 +509,16 @@ static inline struct domain *rcu_lock_current_domain(void) return /*rcu_lock_domain*/(current->domain); } +/* + * This function finds a domain from a domain id. The domain's + * reference count is incremented as part of this function. + * The caller must call put_domain to un-reference the domain. + * + * dom Domain ID of the domain to be found. + * + * return On success the pointer to a struct domain. + * On failure, return NULL. + */ struct domain *get_domain_by_id(domid_t dom); void domain_destroy(struct domain *d); int domain_kill(struct domain *d); -- 1.7.9.5