1 #ifndef _IPXE_PENDING_H
2 #define _IPXE_PENDING_H
10 FILE_LICENCE ( GPL2_OR_LATER );
12 /** A pending operation */
13 struct pending_operation {
19 * Check if an operation is pending
21 * @v pending Pending operation
22 * @ret is_pending Operation is pending
24 static inline int is_pending ( struct pending_operation *pending ) {
25 return ( pending->count != 0 );
28 extern int pending_total;
31 * Check if any operations are pending
33 * @ret have_pending Some operations are pending
35 static inline int have_pending ( void ) {
36 return ( pending_total != 0 );
39 extern void pending_get ( struct pending_operation *pending );
40 extern void pending_put ( struct pending_operation *pending );
42 #endif /* _IPXE_PENDING_H */