iPXE
Data Structures | Functions | Variables
pending.h File Reference

Pending operations. More...

Go to the source code of this file.

Data Structures

struct  pending_operation
 A pending operation. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
 FILE_SECBOOT (PERMITTED)
 
static int is_pending (struct pending_operation *pending)
 Check if an operation is pending. More...
 
static int have_pending (void)
 Check if any operations are pending. More...
 
void pending_get (struct pending_operation *pending)
 Mark an operation as pending. More...
 
void pending_put (struct pending_operation *pending)
 Mark an operation as no longer pending. More...
 

Variables

int pending_total
 Total count of pending operations. More...
 

Detailed Description

Pending operations.

Definition in file pending.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED  )

◆ is_pending()

static int is_pending ( struct pending_operation pending)
inlinestatic

Check if an operation is pending.

Parameters
pendingPending operation
Return values
is_pendingOperation is pending

Definition at line 25 of file pending.h.

25  {
26  return ( pending->count != 0 );
27 }
uint32_t pending
Pending events.
Definition: hyperv.h:12

References pending.

Referenced by tcp_close(), tls_new_finished(), tls_progress(), tls_ready(), tls_restart(), and tls_tx_step().

◆ have_pending()

static int have_pending ( void  )
inlinestatic

Check if any operations are pending.

Return values
have_pendingSome operations are pending

Definition at line 36 of file pending.h.

36  {
37  return ( pending_total != 0 );
38 }
int pending_total
Total count of pending operations.
Definition: pending.c:39

References pending_total.

Referenced by sync_progress().

◆ pending_get()

void pending_get ( struct pending_operation pending)

Mark an operation as pending.

Parameters
pendingPending operation

Definition at line 46 of file pending.c.

46  {
47 
48  pending->count++;
49  pending_total++;
50  DBGC ( pending, "PENDING %p incremented to %d (total %d)\n",
51  pending, pending->count, pending_total );
52 }
#define DBGC(...)
Definition: compiler.h:505
uint32_t pending
Pending events.
Definition: hyperv.h:12
int pending_total
Total count of pending operations.
Definition: pending.c:39

References DBGC, pending, and pending_total.

Referenced by neighbour_tx(), tcp_close(), tcp_open(), tcp_rx_ack(), tcp_xfer_deliver(), tls_new_server_hello_done(), and tls_restart().

◆ pending_put()

void pending_put ( struct pending_operation pending)

Mark an operation as no longer pending.

Parameters
pendingPending operation

Definition at line 59 of file pending.c.

59  {
60 
61  if ( pending->count ) {
62  pending_total--;
63  pending->count--;
64  DBGC ( pending, "PENDING %p decremented to %d (total %d)\n",
65  pending, pending->count, pending_total );
66  }
67 }
#define DBGC(...)
Definition: compiler.h:505
uint32_t pending
Pending events.
Definition: hyperv.h:12
int pending_total
Total count of pending operations.
Definition: pending.c:39

References DBGC, pending, and pending_total.

Referenced by neighbour_destroy(), neighbour_tx_queue(), tcp_close(), tcp_process_tx_queue(), tcp_rx_ack(), tls_close(), tls_new_finished(), tls_send_finished(), and tls_validator_done().

Variable Documentation

◆ pending_total

int pending_total

Total count of pending operations.

Definition at line 39 of file pending.c.

Referenced by have_pending(), pending_get(), and pending_put().