Skip to contentSkip to conversation

Add doc-comment to get_domain_by_id

PATCH Superseded Mats Petersson 2 participants 4 messages Jan 18, 2013

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add doc-comment to get_domain_by_id

# HG changeset patch
# User Mats Petersson <[email protected]> # Date 1358516011 0
# Node ID 9662deb217d7869d35dce5587ae8a1b45296b3a0 # Parent 126ce5f1855ba21ae24fc1c0981e5c05a3245bad Add doc-comment to get_domain_by_id

xen/common/domain.c +10 -1
@@ -373,7 +373,16 @@
     free_cpumask_var(cpumask);
 }
 
-
+/**
+ * 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.
+ *
+ * @param 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)
 {
     struct domain *d;
#1 lore raw
Quoted 29 lines · Mats Petersson

# HG changeset patch
# User Mats Petersson <[email protected]> # Date 1358516011 0
# Node ID 9662deb217d7869d35dce5587ae8a1b45296b3a0 # Parent 126ce5f1855ba21ae24fc1c0981e5c05a3245bad Add doc-comment to get_domain_by_id

xen/common/domain.c +10 -1
@@ -373,7 +373,16 @@
      free_cpumask_var(cpumask);
  }
 
-
+/**
+ * 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.
+ *
+ * @param 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)
  {
      struct domain *d;
Quoted 6 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Sorry for the badly formatted patch - will submit a V2 with "better" formatting & signed off... "hg email" is a bit different to "git send-email", I just learned... ;)

--
Mats

#2 lore raw
In reply to Mats Petersson

xen/common/domain.c

Quoted 10 lines · Mats Petersson

# HG changeset patch
# User Mats Petersson <[email protected]> # Date 1358516011 0
# Node ID 9662deb217d7869d35dce5587ae8a1b45296b3a0 # Parent 126ce5f1855ba21ae24fc1c0981e5c05a3245bad Add doc-comment to get_domain_by_id

xen/common/domain.c +0 -0

We normally put these comments in the header next to the protoype.

xen/common/domain.c line 376

Quoted 6 lines
xen/common/domain.c +1 -1
@@ -373,7 +373,16 @@
     free_cpumask_var(cpumask);
 }
 
-
+/**

Nothing in the Xen infrastructure parses these sorts of headers and practically nowhere else uses them. I'd say just make this a regular comment.

Ian.

#3 lore raw
Quoted 8 lines · Ian Campbell
Quoted 7 lines · Mats Petersson

# HG changeset patch
# User Mats Petersson <[email protected]> # Date 1358516011 0
# Node ID 9662deb217d7869d35dce5587ae8a1b45296b3a0 # Parent 126ce5f1855ba21ae24fc1c0981e5c05a3245bad Add doc-comment to get_domain_by_id

Quoted 4 lines

xen/common/domain.c

Quoted 3 lines
xen/common/domain.c +0 -0

We normally put these comments in the header next to the protoype.

Ok, I can move it... ;)

Quoted 10 lines

xen/common/domain.c line 376

Quoted 7 lines
xen/common/domain.c +1 -1
@@ -373,7 +373,16 @@
      free_cpumask_var(cpumask);
  }
 
-
+/**

Nothing in the Xen infrastructure parses these sorts of headers and practically nowhere else uses them. I'd say just make this a regular comment.

And there I was searching for "how do you do doxygen style comments" after having written a normal one, just so I could avoid being told that "You should use doxygen format... " ;) I guess that's why I couldn't trivially find something.

--
Mats

Quoted 3 lines

Ian.