iPXE
Functions | Variables
pending.c File Reference

Pending operations. More...

#include <errno.h>
#include <ipxe/process.h>
#include <ipxe/timer.h>
#include <ipxe/pending.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
void pending_get (struct pending_operation *pending)
 Mark an operation as pending.
void pending_put (struct pending_operation *pending)
 Mark an operation as no longer pending.

Variables

int pending_total
 Total count of pending operations.

Detailed Description

Pending operations.

Definition in file pending.c.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
void pending_get ( struct pending_operation pending)

Mark an operation as pending.

Parameters:
pendingPending operation

Definition at line 45 of file pending.c.

References pending_operation::count, DBGC, and pending_total.

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

                                                       {

        pending->count++;
        pending_total++;
        DBGC ( pending, "PENDING %p incremented to %d (total %d)\n",
               pending, pending->count, pending_total );
}
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.

References pending_operation::count, DBGC, and pending_total.

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

                                                       {

        if ( pending->count ) {
                pending_total--;
                pending->count--;
                DBGC ( pending, "PENDING %p decremented to %d (total %d)\n",
                       pending, pending->count, pending_total );
        }
}

Variable Documentation

Total count of pending operations.

Definition at line 38 of file pending.c.

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