mirror of
https://github.com/ipxe/ipxe
synced 2025-12-12 23:15:10 +03:00
[efi] Allow calls to efi_snp_claim() and efi_snp_release() to be nested
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -73,14 +73,14 @@ extern int efi_snp_hii_install ( struct efi_snp_device *snpdev );
|
||||
extern void efi_snp_hii_uninstall ( struct efi_snp_device *snpdev );
|
||||
extern struct efi_snp_device * find_snpdev ( EFI_HANDLE handle );
|
||||
extern struct efi_snp_device * last_opened_snpdev ( void );
|
||||
extern void efi_snp_set_claimed ( int claimed );
|
||||
extern void efi_snp_add_claim ( int delta );
|
||||
|
||||
/**
|
||||
* Claim network devices for use by iPXE
|
||||
*
|
||||
*/
|
||||
static inline void efi_snp_claim ( void ) {
|
||||
efi_snp_set_claimed ( 1 );
|
||||
efi_snp_add_claim ( +1 );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -88,7 +88,7 @@ static inline void efi_snp_claim ( void ) {
|
||||
*
|
||||
*/
|
||||
static inline void efi_snp_release ( void ) {
|
||||
efi_snp_set_claimed ( 0 );
|
||||
efi_snp_add_claim ( -1 );
|
||||
}
|
||||
|
||||
#endif /* _IPXE_EFI_SNP_H */
|
||||
|
||||
Reference in New Issue
Block a user