|
iPXE
|
Pooled connections. More...
Go to the source code of this file.
Data Structures | |
| struct | pooled_connection |
| A pooled connection. More... | |
Macros | |
| #define | pool_recycle_TYPE(object_type) |
| #define | pool_reopen_TYPE(object_type) |
Enumerations | |
| enum | pooled_connection_flags { POOL_RECYCLABLE = 0x0001 , POOL_RECYCLED = 0x0002 , POOL_ALIVE = 0x0004 } |
| Pooled connection flags. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| void | pool_add (struct pooled_connection *pool, struct list_head *list, unsigned long expiry) |
| Add connection to pool. | |
| void | pool_del (struct pooled_connection *pool) |
| Remove connection from pool. | |
| void | pool_expired (struct retry_timer *timer, int over) |
| Close expired pooled connection. | |
| static | __attribute__ ((always_inline)) void pool_init(struct pooled_connection *pool |
| Initialise a pooled connection. | |
| void | pool_recycle (struct interface *intf) |
| Recycle this connection after closing. | |
| void | pool_reopen (struct interface *intf) |
| Reopen a defunct connection. | |
Variables | |
| static void(* | expired )(struct pooled_connection *pool) = expired |
| static void struct refcnt * | refcnt |
| timer_init & | pool |
Pooled connections.
Definition in file pool.h.
| #define pool_recycle_TYPE | ( | object_type | ) |
| #define pool_reopen_TYPE | ( | object_type | ) |
Pooled connection flags.
| Enumerator | |
|---|---|
| POOL_RECYCLABLE | Connection should be recycled after closing. |
| POOL_RECYCLED | Connection has been recycled. |
| POOL_ALIVE | Connection is known to be alive. |
Definition at line 39 of file pool.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
extern |
Add connection to pool.
| pool | Pooled connection |
| list | List of pooled connections |
| expiry | Expiry time |
Definition at line 64 of file pool.c.
References assert, list_add_tail, list_empty, pool, and start_timer_fixed().
Referenced by http_conn_xfer_close().
|
extern |
Remove connection from pool.
| pool | Pooled connection |
Definition at line 83 of file pool.c.
References INIT_LIST_HEAD, list_del, pool, POOL_RECYCLED, and stop_timer().
Referenced by http_conn_close(), and http_connect().
|
extern |
Close expired pooled connection.
| timer | Expiry timer |
| over | Failure indicator |
Definition at line 102 of file pool.c.
References __unused, assert, container_of, INIT_LIST_HEAD, list_del, list_empty, and pool.
|
inlinestatic |
Initialise a pooled connection.
Check if pooled connection is reopenable.
Check if pooled connection is recyclable.
Mark pooled connection as alive.
Mark pooled connection as recyclable.
| pool | Pooled connection |
| expired | Close expired pooled connection method |
| refcnt | Containing object reference counter |
| pool | Pooled connection |
| pool | Pooled connection |
| recyclable | Pooled connection is recyclable |
| pool | Pooled connection |
| reopenable | Pooled connection is reopenable |
Definition at line 75 of file pool.h.
References pool, and POOL_RECYCLABLE.
|
extern |
Recycle this connection after closing.
| intf | Data transfer interface |
Definition at line 42 of file pool.c.
References intf_poke(), and pool_recycle().
Referenced by http_transfer_complete(), and pool_recycle().
|
extern |
Reopen a defunct connection.
| intf | Data transfer interface |
Definition at line 52 of file pool.c.
References intf_poke(), and pool_reopen().
Referenced by http_conn_socket_close(), and pool_reopen().
| pool expired | ( | struct pooled_connection * | pool | ) | = expired |
Definition at line 62 of file pool.h.
Referenced by ib_mi_timer_expired().
| timer refcnt |
| timer_init & pool |
Definition at line 66 of file pool.h.
Referenced by __attribute__(), http_conn_expired(), http_connect(), pool_add(), pool_del(), and pool_expired().