From 7ff81f6654b36b12820e76c8fb864afb5b0343bb Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 1 May 2007 00:04:21 +0000 Subject: [PATCH] Document the fact that a zeroed-out refcounted object will behave in the most generally useful way. --- src/include/gpxe/refcnt.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/include/gpxe/refcnt.h b/src/include/gpxe/refcnt.h index ed147b9a..0930a577 100644 --- a/src/include/gpxe/refcnt.h +++ b/src/include/gpxe/refcnt.h @@ -12,6 +12,11 @@ * * 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