iPXE
pending.h
Go to the documentation of this file.
1#ifndef _IPXE_PENDING_H
2#define _IPXE_PENDING_H
3
4/** @file
5 *
6 * Pending operations
7 *
8 */
9
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11FILE_SECBOOT ( PERMITTED );
12
13/** A pending operation */
15 /** Pending count */
16 unsigned int count;
17};
18
19/**
20 * Check if an operation is pending
21 *
22 * @v pending Pending operation
23 * @ret is_pending Operation is pending
24 */
25static inline int is_pending ( struct pending_operation *pending ) {
26 return ( pending->count != 0 );
27}
28
29extern int pending_total;
30
31/**
32 * Check if any operations are pending
33 *
34 * @ret have_pending Some operations are pending
35 */
36static inline int have_pending ( void ) {
37 return ( pending_total != 0 );
38}
39
40extern void pending_get ( struct pending_operation *pending );
41extern void pending_put ( struct pending_operation *pending );
42
43#endif /* _IPXE_PENDING_H */
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
uint32_t pending
Pending events.
Definition hyperv.h:1
int pending_total
Total count of pending operations.
Definition pending.c:39
void pending_put(struct pending_operation *pending)
Mark an operation as no longer pending.
Definition pending.c:59
static int is_pending(struct pending_operation *pending)
Check if an operation is pending.
Definition pending.h:25
static int have_pending(void)
Check if any operations are pending.
Definition pending.h:36
void pending_get(struct pending_operation *pending)
Mark an operation as pending.
Definition pending.c:46
A pending operation.
Definition pending.h:14
unsigned int count
Pending count.
Definition pending.h:16