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)
 
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  )

◆ 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 24 of file pending.h.

24  {
25  return ( pending->count != 0 );
26 }
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 35 of file pending.h.

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

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 45 of file pending.c.

45  {
46 
47  pending->count++;
48  pending_total++;
49  DBGC ( pending, "PENDING %p incremented to %d (total %d)\n",
50  pending, pending->count, pending_total );
51 }
#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:38

References DBGC, pending, and pending_total.

Referenced by 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 58 of file pending.c.

58  {
59 
60  if ( pending->count ) {
61  pending_total--;
62  pending->count--;
63  DBGC ( pending, "PENDING %p decremented to %d (total %d)\n",
64  pending, pending->count, pending_total );
65  }
66 }
#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:38

References DBGC, pending, and pending_total.

Referenced by 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 38 of file pending.c.

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