mirror of
https://github.com/ipxe/ipxe
synced 2025-12-12 23:15:10 +03:00
[refcnt] Add ref_no_free handler
Since more reference-counted structures than embedded images might want to mark themselves unfreeable, expose a dummy ref_no_free(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
committed by
Michael Brown
parent
b707f15ecb
commit
719ba316df
@@ -76,3 +76,15 @@ void ref_put ( struct refcnt *refcnt ) {
|
||||
free ( refcnt );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not free reference-counted object
|
||||
*
|
||||
* @v refcnt Reference counter
|
||||
*
|
||||
* This is meant for initializing a reference counter structure in a
|
||||
* statically allocated object.
|
||||
*/
|
||||
void ref_no_free ( struct refcnt *refcnt __unused ) {
|
||||
/* Do nothing */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user