Document the fact that a zeroed-out refcounted object will behave in
authorMichael Brown <mcb30@etherboot.org>
Tue, 1 May 2007 00:04:21 +0000 (00:04 +0000)
committerMichael Brown <mcb30@etherboot.org>
Tue, 1 May 2007 00:04:21 +0000 (00:04 +0000)
the most generally useful way.

src/include/gpxe/refcnt.h

index ed147b9..0930a57 100644 (file)
  *
  * This data structure is designed to be embedded within a
  * reference-counted object.
  *
  * This data structure is designed to be embedded within a
  * reference-counted object.
+ *
+ * Reference-counted objects are freed when their reference count
+ * drops below zero.  This means that a freshly allocated-and-zeroed
+ * reference-counted object will be freed on the first call to
+ * ref_put().
  */
 struct refcnt {
        /** Current reference count
  */
 struct refcnt {
        /** Current reference count