
#include <unistd.h>#include <stdlib.h>#include "vipl_priv.h"Go to the source code of this file.
Functions | |
| VIP_RETURN | vip_init_handle_set (VIP_HANDLE_SET *set_ptr, VIP_UINT32 handle_size, VIP_UINT32 max_count, VIP_UINT32 magic_number) |
| VIP_HANDLE * | vip_allocate_handle (VIP_HANDLE_SET *set_ptr) |
| void | vip_free_handle (VIP_HANDLE_SET *set_ptr, VIP_HANDLE *handle_ptr) |
| void | vip_destroy_conn_handle_set (VIP_HANDLE_SET *set_ptr) |
| void | vip_destroy_vi_handle_set (VIP_HANDLE_SET *set_ptr) |
| void | vip_destroy_cq_handle_set (VIP_HANDLE_SET *set_ptr) |
| void | vip_destroy_mem_handle_set (VIP_HANDLE_SET *set_ptr) |
| void | vip_destroy_ptag_handle_set (VIP_HANDLE_SET *set_ptr) |
| VIP_BOOLEAN | vip_is_conn_notified (VIP_PVOID ptr) |
| VIP_BOOLEAN | vip_is_first_desc_notified (VIP_PVOID ptr) |
| VIP_BOOLEAN | vip_is_first_cq_entry_notified (VIP_PVOID ptr) |
| void * | vip_send_notify_thread (void *arg) |
| void * | vip_recv_notify_thread (void *arg) |
| void * | vip_cq_notify_thread (void *arg) |
Definition in file vipl_priv_handles.c.
|
||||||||||||||||||||
|
This function initializes a handle set. It sets up a GM lookaside list to efficiently allocate the handles, and sets the maximum size of the collection.
Definition at line 55 of file vipl_priv_handles.c. References VIP_HANDLE_SET::count, VIP_HANDLE_SET::cur_seq_num, VIP_HANDLE_SET::head, VIP_HANDLE_SET::lookaside, VIP_HANDLE_SET::max_count, VIP_HANDLE_SET::set_magic, VIP_HANDLE_SET::tail, VIP_CONN_MAGIC, VIP_CQ_MAGIC, VIP_DEBUG, VIP_DEBUG_LABEL, VIP_ERROR_RESOURCE, VIP_INVALID_PARAMETER, VIP_MEM_MAGIC, VIP_PTAG_MAGIC, VIP_SUCCESS, and VIP_VI_MAGIC. Referenced by VipOpenNic(). |
|
|
||||||||||||
|
This function frees a previously allocated handle from a handle set. It first disables the handle, then removes it from the doubly-linked list and finally releases it from the GM lookaside.
Definition at line 199 of file vipl_priv_handles.c. References VIP_HANDLE_SET::count, VIP_HANDLE_SET::head, VIP_NIC::lock, VIP_HANDLE::magic, VIP_HANDLE::next, VIP_HANDLE::prev, VIP_HANDLE::ref_count, VIP_HANDLE_SET::tail, VIP_ASSERT, VIP_ASSERT_MUTEX_LOCKED, VIP_DEBUG, VIP_DEBUG_LABEL, VIP_HANDLE::vip_nic_ptr, and VIP_HANDLE_SET::vip_nic_ptr. Referenced by vip_destroy_conn_handle_set(), vip_destroy_cq_handle_set(), vip_destroy_mem_handle_set(), vip_destroy_ptag_handle_set(), vip_destroy_vi_handle_set(), VipConnectAccept(), VipConnectPeerDone(), VipConnectPeerRequest(), VipConnectPeerWait(), VipConnectReject(), VipConnectRequest(), VipConnectWait(), VipCreateCQ(), VipDeregisterMem(), VipDestroyCQ(), VipDestroyPtag(), VipDestroyVi(), VipDisconnect(), and VipRegisterMem(). |
|
|
This function destroys a previously initialized CONN handle set. For each entry in the set, it locks the handle, eventually wakes up all processes waiting for it and calls vip_free_handle(). It then destroys the GM lookaside list and all collateral structures.
Definition at line 251 of file vipl_priv_handles.c. References VIP_HANDLE_SET::count, VIP_CONN::event, VIP_CONN::handle, VIP_HANDLE_SET::head, VIP_NIC::lock, VIP_HANDLE_SET::lookaside, VIP_HANDLE_SET::max_count, VIP_HANDLE::ref_count, VIP_HANDLE_SET::set_magic, VIP_HANDLE_SET::tail, VIP_ABORT, VIP_ASSERT, VIP_ASSERT_MUTEX_LOCKED, VIP_CONN_MAGIC, VIP_DEBUG, VIP_DEBUG_LABEL, VIP_EVENT_SIGNAL, vip_free_handle(), vip_millisleep(), VIP_MUTEX_LOCK, VIP_MUTEX_UNLOCK, and VIP_HANDLE_SET::vip_nic_ptr. Referenced by VipCloseNic(). |
|
|
This function destroys a previously initialized VI handle set. For each entry in the set, it locks the handle, eventually wakes up all processes waiting for it and calls vip_free_handle(). It then destroys the GM lookaside list and all collateral structures.
Definition at line 316 of file vipl_priv_handles.c. References VIP_HANDLE_SET::count, VIP_VI_QUEUE::event, VIP_PTAG::handle, VIP_CQ::handle, VIP_VI::handle, VIP_HANDLE_SET::head, VIP_NIC::lock, VIP_HANDLE_SET::lookaside, VIP_HANDLE_SET::max_count, VIP_VI::recv_queue, VIP_HANDLE::ref_count, VIP_VI::send_queue, VIP_HANDLE_SET::set_magic, VIP_HANDLE_SET::tail, VIP_ABORT, VIP_ASSERT, VIP_ASSERT_MUTEX_LOCKED, VIP_VI_QUEUE::vip_cq_ptr, VIP_DEBUG, VIP_DEBUG_LABEL, VIP_EVENT_SIGNAL, vip_free_handle(), vip_millisleep(), VIP_MUTEX_LOCK, VIP_MUTEX_UNLOCK, VIP_HANDLE_SET::vip_nic_ptr, VIP_VI::vip_ptag_ptr, and VIP_VI_MAGIC. Referenced by VipCloseNic(), and VipOpenNic(). |
|
|
This function destroys a previously initialized CQ handle set. For each entry in the set, it locks the handle, eventually wakes up all processes waiting for it and calls vip_free_handle(). It then destroys the GM lookaside list and all collateral structures.
Definition at line 398 of file vipl_priv_handles.c. References VIP_HANDLE_SET::count, VIP_CQ::event, VIP_CQ::handle, VIP_HANDLE_SET::head, VIP_NIC::lock, VIP_HANDLE_SET::lookaside, VIP_HANDLE_SET::max_count, VIP_HANDLE::ref_count, VIP_HANDLE_SET::set_magic, VIP_HANDLE_SET::tail, VIP_ABORT, VIP_ASSERT, VIP_ASSERT_MUTEX_LOCKED, VIP_CQ_MAGIC, VIP_DEBUG, VIP_DEBUG_LABEL, VIP_EVENT_SIGNAL, vip_free_handle(), vip_millisleep(), VIP_MUTEX_LOCK, VIP_MUTEX_UNLOCK, and VIP_HANDLE_SET::vip_nic_ptr. Referenced by VipCloseNic(), and VipOpenNic(). |
|
|
This function destroys a previously initialized MEM handle set. For each entry in the set, it locks the handle, eventually wakes up all processes waiting for it and calls vip_free_handle(). It then destroys the GM lookaside list and all collateral structures.
Definition at line 464 of file vipl_priv_handles.c. References VIP_HANDLE_SET::count, VIP_HANDLE_SET::head, VIP_NIC::lock, VIP_HANDLE_SET::lookaside, VIP_HANDLE_SET::max_count, VIP_HANDLE::ref_count, VIP_HANDLE_SET::set_magic, VIP_HANDLE_SET::tail, VIP_ABORT, VIP_ASSERT, VIP_ASSERT_MUTEX_LOCKED, VIP_DEBUG, VIP_DEBUG_LABEL, vip_free_handle(), VIP_MEM_MAGIC, and VIP_HANDLE_SET::vip_nic_ptr. Referenced by VipCloseNic(), and VipOpenNic(). |
|
|
This function destroys a previously initialized PTAG handle set. For each entry in the set, it locks the handle, eventually wakes up all processes waiting for it and calls vip_free_handle(). It then destroys the GM lookaside list and all collateral structures.
Definition at line 515 of file vipl_priv_handles.c. References VIP_HANDLE_SET::count, VIP_HANDLE_SET::head, VIP_NIC::lock, VIP_HANDLE_SET::lookaside, VIP_HANDLE_SET::max_count, VIP_HANDLE::ref_count, VIP_HANDLE_SET::set_magic, VIP_HANDLE_SET::tail, VIP_ABORT, VIP_ASSERT, VIP_ASSERT_MUTEX_LOCKED, VIP_DEBUG, VIP_DEBUG_LABEL, vip_free_handle(), VIP_HANDLE_SET::vip_nic_ptr, and VIP_PTAG_MAGIC. Referenced by VipCloseNic(), and VipOpenNic(). |
|
|
This function checks if a connection handle has received an event.
Definition at line 560 of file vipl_priv_handles.c. References VIP_CONN::status, VIP_FALSE, VIP_NOT_DONE, and VIP_TRUE. Referenced by VipConnectAccept(), VipConnectPeerWait(), VipConnectRequest(), and VipConnectWait(). |
|
|
This function checks if the first descriptor of a VI queue has received an event.
Definition at line 592 of file vipl_priv_handles.c. References VIP_DESCRIPTOR::CS, VIP_VI_QUEUE::first, VIP_CONTROL_SEGMENT::Status, VIP_FALSE, VIP_STATUS_DONE, and VIP_TRUE. Referenced by VipRecvWait(), and VipSendWait(). |
|
|
This function checks if the next entry in the completion queue has received an event.
Definition at line 624 of file vipl_priv_handles.c. References VIP_CQ::next_poll, VIP_CQ::queue, VIP_FALSE, and VIP_TRUE. Referenced by VipCQWait(). |
|
|
This thread waits for send notify handles to be added to the list and then wait for the first send descriptor to complete. It then executes the send notify handler. If the send queue becomes empty, it will process the notify handler with a null descriptor.
Definition at line 656 of file vipl_priv_handles.c. References VIP_NOTIFY::context, VIP_VI::handle, VIP_NOTIFY::handler, VIP_NIC::lock, VIP_GM::lock, VIP_NOTIFY::next, VIP_VI_QUEUE::notify_cancelled, VIP_VI_QUEUE::notify_tokens, VIP_VI::send_queue, VIP_ABORT, VIP_ASSERT, VIP_DEBUG, VIP_DEBUG_LABEL, VIP_DESCRIPTOR_ERROR, VIP_NIC::vip_gm_ptr, VIP_INFINITE, VIP_MUTEX_LOCK, VIP_MUTEX_UNLOCK, VIP_HANDLE::vip_nic_ptr, VIP_SEMAPHORE_WAIT, VIP_SUCCESS, VIP_THREAD_EXIT, VIP_TRUE, and VipSendWait(). Referenced by VipSendNotify(). |
|
|
This thread waits for receive notify handles to be added to the list and then wait for the first receive descriptor to complete. It then executes the receive notify handler. If the receive queue becomes empty, it will process the notify handler with a null descriptor.
Definition at line 743 of file vipl_priv_handles.c. References VIP_NOTIFY::context, VIP_VI::handle, VIP_NOTIFY::handler, VIP_NIC::lock, VIP_GM::lock, VIP_NOTIFY::next, VIP_VI_QUEUE::notify_cancelled, VIP_VI_QUEUE::notify_tokens, VIP_VI::recv_queue, VIP_ABORT, VIP_ASSERT, VIP_DEBUG, VIP_DEBUG_LABEL, VIP_DESCRIPTOR_ERROR, VIP_NIC::vip_gm_ptr, VIP_INFINITE, VIP_MUTEX_LOCK, VIP_MUTEX_UNLOCK, VIP_HANDLE::vip_nic_ptr, VIP_SEMAPHORE_WAIT, VIP_SUCCESS, VIP_THREAD_EXIT, VIP_TRUE, and VipRecvWait(). Referenced by VipRecvNotify(). |
|
|
This thread waits for receive notify handles to be added to the list and then wait for the first CQ entry to complete. It then executes the CQ notify handler. If the CQ becomes empty, it will process the notify handler with a null descriptor.
Definition at line 830 of file vipl_priv_handles.c. References VIP_NOTIFY::context, VIP_CQ::handle, VIP_NOTIFY::handler, VIP_NIC::lock, VIP_GM::lock, VIP_NOTIFY::next, VIP_CQ::notify_cancelled, VIP_CQ::notify_tokens, VIP_ABORT, VIP_ASSERT, VIP_DEBUG, VIP_DEBUG_LABEL, VIP_NIC::vip_gm_ptr, VIP_INFINITE, VIP_MUTEX_LOCK, VIP_MUTEX_UNLOCK, VIP_HANDLE::vip_nic_ptr, VIP_SEMAPHORE_WAIT, VIP_SUCCESS, VIP_THREAD_EXIT, VIP_TRUE, and VipCQWait(). Referenced by VipCQNotify(). |
1.4.4.