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 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 FILE_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  */
25 static inline int is_pending ( struct pending_operation *pending ) {
26  return ( pending->count != 0 );
27 }
28 
29 extern int pending_total;
30 
31 /**
32  * Check if any operations are pending
33  *
34  * @ret have_pending Some operations are pending
35  */
36 static inline int have_pending ( void ) {
37  return ( pending_total != 0 );
38 }
39 
40 extern void pending_get ( struct pending_operation *pending );
41 extern void pending_put ( struct pending_operation *pending );
42 
43 #endif /* _IPXE_PENDING_H */
int pending_total
Total count of pending operations.
Definition: pending.c:39
uint32_t pending
Pending events.
Definition: hyperv.h:12
void pending_get(struct pending_operation *pending)
Mark an operation as pending.
Definition: pending.c:46
FILE_SECBOOT(PERMITTED)
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
A pending operation.
Definition: pending.h:14
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
unsigned int count
Pending count.
Definition: pending.h:16