Go to the source code of this file.
Data Structures | |
struct | gm_remote_ptr_n_t |
struct | gm_s16_n_t |
struct | gm_s32_n_t |
struct | gm_s64_n_t |
struct | gm_s8_n_t |
struct | gm_u16_n_t |
struct | gm_u32_n_t |
struct | gm_u64_n_t |
struct | gm_u8_n_t |
struct | gm_up_n_t |
Defines | |
#define | GM_API_VERSION_1_0 0x100 |
#define | GM_API_VERSION_1_1 0x101 |
#define | GM_API_VERSION_1_2 0x102 |
#define | GM_API_VERSION_1_3 0x103 |
#define | GM_API_VERSION_1_4 0x104 |
#define | GM_API_VERSION_1_5 0x105 |
#define | GM_API_VERSION_1_6 0x106 |
#define | GM_API_VERSION_2_0 0x200 |
#define | GM_API_VERSION_2_0_6 0x20006 |
#define | GM_API_VERSION GM_API_VERSION_2_0_6 |
#define | GM_MAX_HOST_NAME_LEN 128 |
#define | GM_MAX_PORT_NAME_LEN 32 |
#define | GM_NO_SUCH_NODE_ID 0 |
#define | GM_CPU_alpha 0 |
#define | GM_RDMA_GRANULARITY 64 |
#define | GM_MAX_DMA_GRANULARITY 8 |
#define | GM_STRUCT_CONTAINING(type, field, field_instance) ((type *)((char *)(field_instance) - GM_OFFSETOF (type, field))) |
#define | GM_NUM_ELEM(ar) (sizeof (ar) / sizeof (*ar)) |
#define | GM_POWER_OF_TWO(n) (!((n)&((n)-1))) |
#define | GM_STRUCT_CONTAINING(type, field, field_instance) ((type *)((char *)(field_instance) - GM_OFFSETOF (type, field))) |
#define | GM_NUM_ELEM(ar) (sizeof (ar) / sizeof (*ar)) |
#define | GM_POWER_OF_TWO(n) (!((n)&((n)-1))) |
Typedefs | |
typedef gm_u64_t | gm_remote_ptr_t |
typedef enum gm_status | gm_status_t |
typedef void(* | gm_send_completion_callback_t )(struct gm_port *p, void *context, gm_status_t status) |
typedef gm_u32_t | gm_pid_t |
Enumerations | |
enum | gm_status { GM_SUCCESS = 0, GM_FAILURE = 1, GM_INPUT_BUFFER_TOO_SMALL = 2, GM_OUTPUT_BUFFER_TOO_SMALL = 3, GM_TRY_AGAIN = 4, GM_BUSY = 5, GM_MEMORY_FAULT = 6, GM_INTERRUPTED = 7, GM_INVALID_PARAMETER = 8, GM_OUT_OF_MEMORY = 9, GM_INVALID_COMMAND = 10, GM_PERMISSION_DENIED = 11, GM_INTERNAL_ERROR = 12, GM_UNATTACHED = 13, GM_UNSUPPORTED_DEVICE = 14, GM_SEND_TIMED_OUT = 15, GM_SEND_REJECTED = 16, GM_SEND_TARGET_PORT_CLOSED = 17, GM_SEND_TARGET_NODE_UNREACHABLE = 18, GM_SEND_DROPPED = 19, GM_SEND_PORT_CLOSED = 20, GM_NODE_ID_NOT_YET_SET = 21, GM_STILL_SHUTTING_DOWN = 22, GM_CLONE_BUSY = 23, GM_NO_SUCH_DEVICE = 24, GM_ABORTED = 25, GM_INCOMPATIBLE_LIB_AND_DRIVER = 26, GM_UNTRANSLATED_SYSTEM_ERROR = 27, GM_ACCESS_DENIED = 28, GM_NO_DRIVER_SUPPORT = 29, GM_PTE_REF_CNT_OVERFLOW = 30, GM_NOT_SUPPORTED_IN_KERNEL = 31, GM_NOT_SUPPORTED_ON_ARCH = 32, GM_NO_MATCH = 33, GM_USER_ERROR = 34, GM_TIMED_OUT = 35, GM_DATA_CORRUPTED = 36, GM_HARDWARE_FAULT = 37, GM_SEND_ORPHANED = 38, GM_MINOR_OVERFLOW = 39, GM_PAGE_TABLE_FULL = 40, GM_UC_ERROR = 41, GM_INVALID_PORT_NUMBER = 42, GM_DEV_NOT_FOUND = 43, GM_FIRMWARE_NOT_RUNNING = 44, GM_YP_NO_MATCH = 45 } |
enum | gm_priority { GM_LOW_PRIORITY = 0, GM_HIGH_PRIORITY = 1, GM_NUM_PRIORITIES = 2 } |
enum | gm_recv_event_type { GM_NO_RECV_EVENT = 0, GM_SENDS_FAILED_EVENT = 1, GM_ALARM_EVENT = 2 , GM_RECV_EVENT = 11, GM_HIGH_RECV_EVENT = 12, GM_PEER_RECV_EVENT = 13, GM_HIGH_PEER_RECV_EVENT = 14, GM_FAST_RECV_EVENT = 15, GM_FAST_HIGH_RECV_EVENT = 16, GM_FAST_PEER_RECV_EVENT = 17, GM_FAST_HIGH_PEER_RECV_EVENT = 18 , GM_NEW_SENDS_FAILED_EVENT = 129 , GM_NEW_RECV_EVENT = 139 , GM_NEW_FAST_RECV_EVENT = 143 , _GM_NEW_PUT_NOTIFICATION_EVENT = 149 , GM_NUM_RECV_EVENT_TYPES } |
Functions | |
GM_ENTRY_POINT void | gm_abort (void) |
GM_ENTRY_POINT int | gm_alloc_send_token (struct gm_port *p, unsigned int priority) |
GM_ENTRY_POINT gm_status_t | gm_allow_remote_memory_access (struct gm_port *p) |
GM_ENTRY_POINT void | gm_bcopy (const void *from, void *to, gm_size_t len) |
GM_ENTRY_POINT union gm_recv_event * | gm_blocking_receive (struct gm_port *p) |
GM_ENTRY_POINT union gm_recv_event * | gm_blocking_receive_no_spin (struct gm_port *p) |
GM_ENTRY_POINT void | gm_bzero (void *ptr, gm_size_t len) |
GM_ENTRY_POINT void * | gm_calloc (gm_size_t len, gm_size_t cnt) |
GM_ENTRY_POINT void | gm_cancel_alarm (struct gm_alarm *gm_alarm) |
GM_ENTRY_POINT void | gm_close (struct gm_port *p) |
GM_ENTRY_POINT void | gm_datagram_send (struct gm_port *p, void *message, unsigned int size, gm_size_t len, unsigned int priority, unsigned int target_node_id, unsigned int target_port_id, gm_send_completion_callback_t callback, void *context) |
GM_ENTRY_POINT void | gm_datagram_send_4 (struct gm_port *p, gm_u32_t message, unsigned int size, gm_size_t len, unsigned int priority, unsigned int target_node_id, unsigned int target_port_id, gm_send_completion_callback_t callback, void *context) |
GM_ENTRY_POINT gm_status_t | gm_deregister_memory (struct gm_port *p, void *ptr, gm_size_t length) |
GM_ENTRY_POINT void | gm_directed_send_with_callback (struct gm_port *p, void *source_buffer, gm_remote_ptr_t target_buffer, gm_size_t len, enum gm_priority priority, unsigned int target_node_id, unsigned int target_port_id, gm_send_completion_callback_t callback, void *context) |
GM_ENTRY_POINT void * | gm_dma_calloc (struct gm_port *p, gm_size_t count, gm_size_t length) |
GM_ENTRY_POINT void | gm_dma_free (struct gm_port *p, void *addr) |
GM_ENTRY_POINT void * | gm_dma_malloc (struct gm_port *p, gm_size_t length) |
GM_ENTRY_POINT void | gm_flush_alarm (struct gm_port *p) |
GM_ENTRY_POINT void | gm_free (void *ptr) |
GM_ENTRY_POINT void | gm_free_send_token (struct gm_port *p, unsigned int priority) |
GM_ENTRY_POINT void | gm_free_send_tokens (struct gm_port *p, unsigned int priority, unsigned int count) |
GM_ENTRY_POINT gm_status_t | gm_get_host_name (struct gm_port *port, char name[GM_MAX_HOST_NAME_LEN]) |
GM_ENTRY_POINT gm_status_t | gm_get_node_type (struct gm_port *port, int *node_type) |
GM_ENTRY_POINT gm_status_t | gm_get_node_id (struct gm_port *port, unsigned int *n) |
GM_ENTRY_POINT gm_status_t | gm_get_unique_board_id (struct gm_port *port, char unique[6]) |
GM_ENTRY_POINT gm_status_t | gm_get_mapper_unique_id (struct gm_port *port, char unique[6]) |
GM_ENTRY_POINT void | gm_hex_dump (const void *ptr, gm_size_t len) |
GM_ENTRY_POINT unsigned int | gm_host_name_to_node_id (struct gm_port *port, char *_host_name) |
GM_ENTRY_POINT void | gm_initialize_alarm (struct gm_alarm *my_alarm) |
GM_ENTRY_POINT int | gm_isprint (int c) |
GM_ENTRY_POINT void * | gm_malloc (gm_size_t len) |
GM_ENTRY_POINT void * | gm_page_alloc (void) |
GM_ENTRY_POINT void | gm_page_free (void *addr) |
GM_ENTRY_POINT void * | gm_alloc_pages (gm_size_t len) |
GM_ENTRY_POINT void | gm_free_pages (void *addr, gm_size_t len) |
GM_ENTRY_POINT gm_size_t | gm_max_length_for_size (unsigned int size) |
GM_ENTRY_POINT gm_status_t | gm_max_node_id (struct gm_port *port, unsigned int *n) |
GM_ENTRY_POINT int | gm_memcmp (const void *a, const void *b, gm_size_t len) |
GM_ENTRY_POINT void * | gm_memorize_message (void *message, void *buffer, unsigned int len) |
GM_ENTRY_POINT unsigned int | gm_min_message_size (struct gm_port *port) |
GM_ENTRY_POINT unsigned int | gm_min_size_for_length (gm_size_t length) |
GM_ENTRY_POINT unsigned int | gm_mtu (struct gm_port *port) |
GM_ENTRY_POINT char * | gm_node_id_to_host_name (struct gm_port *port, unsigned int node_id) |
GM_ENTRY_POINT gm_status_t | gm_node_id_to_unique_id (struct gm_port *port, unsigned int n, char unique[6]) |
GM_ENTRY_POINT unsigned int | gm_num_ports (struct gm_port *p) |
GM_ENTRY_POINT unsigned int | gm_num_send_tokens (struct gm_port *p) |
GM_ENTRY_POINT unsigned int | gm_num_receive_tokens (struct gm_port *p) |
GM_ENTRY_POINT unsigned int | gm_get_port_id (struct gm_port *p) |
GM_ENTRY_POINT gm_status_t | gm_open (struct gm_port **p, unsigned int unit, unsigned int port, const char *port_name, enum gm_api_version version) |
GM_ENTRY_POINT void | gm_provide_receive_buffer_with_tag (struct gm_port *p, void *ptr, unsigned int size, unsigned int priority, unsigned int tag) |
GM_ENTRY_POINT int | gm_receive_pending (struct gm_port *p) |
GM_ENTRY_POINT int | gm_next_event_peek (struct gm_port *p, gm_u16_t *sender) |
GM_ENTRY_POINT union gm_recv_event * | gm_receive (struct gm_port *p) |
GM_ENTRY_POINT gm_status_t | gm_register_memory (struct gm_port *p, void *ptr, gm_size_t length) |
GM_ENTRY_POINT int | gm_send_token_available (struct gm_port *p, unsigned int priority) |
GM_ENTRY_POINT void | gm_send_with_callback (struct gm_port *p, void *message, unsigned int size, gm_size_t len, unsigned int priority, unsigned int target_node_id, unsigned int target_port_id, gm_send_completion_callback_t callback, void *context) |
GM_ENTRY_POINT void | gm_send_to_peer_with_callback (struct gm_port *p, void *message, unsigned int size, gm_size_t len, unsigned int priority, unsigned int target_node_id, gm_send_completion_callback_t callback, void *context) |
GM_ENTRY_POINT gm_status_t | gm_set_acceptable_sizes (struct gm_port *p, enum gm_priority priority, gm_size_t mask) |
GM_ENTRY_POINT void | gm_set_alarm (struct gm_port *p, struct gm_alarm *my_alarm, gm_u64_t usecs, void(*callback)(void *), void *context) |
GM_ENTRY_POINT gm_size_t | gm_strlen (const char *cptr) |
GM_ENTRY_POINT char * | gm_strncpy (char *to, const char *from, int len) |
GM_ENTRY_POINT int | gm_strcmp (const char *a, const char *b) |
GM_ENTRY_POINT int | gm_strncmp (const char *a, const char *b, int len) |
GM_ENTRY_POINT int | gm_strncasecmp (const char *a, const char *b, int len) |
GM_ENTRY_POINT gm_u64_t | gm_ticks (struct gm_port *port) |
GM_ENTRY_POINT gm_status_t | gm_unique_id (struct gm_port *port, char unique[6]) |
GM_ENTRY_POINT gm_status_t | gm_unique_id_to_node_id (struct gm_port *port, char unique[6], unsigned int *node_id) |
GM_ENTRY_POINT void | gm_unknown (struct gm_port *p, union gm_recv_event *e) |
GM_ENTRY_POINT gm_status_t | _gm_get_route (struct gm_port *p, unsigned int node_id, char *route, unsigned int *len) |
GM_ENTRY_POINT void | gm_dump_buffers (void) |
GM_ENTRY_POINT void | gm_register_buffer (void *addr, int size) |
GM_ENTRY_POINT int | gm_unregister_buffer (void *addr, int size) |
GM_ENTRY_POINT struct gm_lookaside * | gm_create_lookaside (gm_size_t entry_len, gm_size_t min_entry_cnt) |
GM_ENTRY_POINT void | gm_destroy_lookaside (struct gm_lookaside *l) |
GM_ENTRY_POINT void * | gm_lookaside_alloc (struct gm_lookaside *l) |
GM_ENTRY_POINT void * | gm_lookaside_zalloc (struct gm_lookaside *l) |
GM_ENTRY_POINT void | gm_lookaside_free (void *ptr) |
GM_ENTRY_POINT struct gm_hash * | gm_create_hash (long(*gm_user_compare)(void *key1, void *key2), unsigned long(*gm_user_hash)(void *key1), gm_size_t key_len, gm_size_t data_len, gm_size_t gm_min_entries, int flags) |
GM_ENTRY_POINT void | gm_destroy_hash (struct gm_hash *h) |
GM_ENTRY_POINT void * | gm_hash_remove (struct gm_hash *hash, void *key) |
GM_ENTRY_POINT void * | gm_hash_find (struct gm_hash *hash, void *key) |
GM_ENTRY_POINT gm_status_t | gm_hash_insert (struct gm_hash *hash, void *key, void *datum) |
GM_ENTRY_POINT void | gm_hash_rekey (struct gm_hash *hash, void *old_key, void *new_key) |
GM_ENTRY_POINT long | gm_hash_compare_strings (void *key1, void *key2) |
GM_ENTRY_POINT unsigned long | gm_hash_hash_string (void *key) |
GM_ENTRY_POINT long | gm_hash_compare_longs (void *key1, void *key2) |
GM_ENTRY_POINT unsigned long | gm_hash_hash_long (void *key) |
GM_ENTRY_POINT long | gm_hash_compare_ints (void *key1, void *key2) |
GM_ENTRY_POINT unsigned long | gm_hash_hash_int (void *key) |
GM_ENTRY_POINT long | gm_hash_compare_ptrs (void *key1, void *key2) |
GM_ENTRY_POINT unsigned long | gm_hash_hash_ptr (void *key) |
GM_ENTRY_POINT unsigned long | gm_crc (void *ptr, gm_size_t len) |
GM_ENTRY_POINT unsigned long | gm_crc_str (const char *ptr) |
GM_ENTRY_POINT int | gm_rand (void) |
GM_ENTRY_POINT void | gm_srand (int seed) |
GM_ENTRY_POINT unsigned int | gm_rand_mod (unsigned int modulus) |
GM_ENTRY_POINT gm_status_t | gm_init (void) |
GM_ENTRY_POINT void | gm_finalize (void) |
GM_ENTRY_POINT unsigned long | gm_log2_roundup (unsigned long n) |
GM_ENTRY_POINT struct gm_mutex * | gm_create_mutex (void) |
GM_ENTRY_POINT void | gm_destroy_mutex (struct gm_mutex *mu) |
GM_ENTRY_POINT void | gm_mutex_enter (struct gm_mutex *mu) |
GM_ENTRY_POINT void | gm_mutex_exit (struct gm_mutex *mu) |
GM_ENTRY_POINT struct gm_zone * | gm_zone_create_zone (void *base, gm_size_t len) |
GM_ENTRY_POINT void | gm_zone_destroy_zone (struct gm_zone *zone) |
GM_ENTRY_POINT void * | gm_zone_free (struct gm_zone *zone, void *a) |
GM_ENTRY_POINT void * | gm_zone_malloc (struct gm_zone *zone, gm_size_t length) |
GM_ENTRY_POINT void * | gm_zone_calloc (struct gm_zone *zone, gm_size_t count, gm_size_t length) |
GM_ENTRY_POINT int | gm_zone_addr_in_zone (struct gm_zone *zone, void *p) |
GM_ENTRY_POINT void | gm_resume_sending (struct gm_port *p, unsigned int priority, unsigned int target_node_id, unsigned int target_port_id, gm_send_completion_callback_t callback, void *context) |
GM_ENTRY_POINT void | gm_drop_sends (struct gm_port *port, unsigned int priority, unsigned int target_node_id, unsigned int target_port_id, gm_send_completion_callback_t callback, void *context) |
GM_ENTRY_POINT gm_pid_t | gm_getpid (void) |
GM_ENTRY_POINT gm_status_t | gm_directcopy_get (struct gm_port *p, void *source_addr, void *target_addr, gm_size_t length, unsigned int source_instance_id, unsigned int source_port_id) |
GM_ENTRY_POINT void | gm_perror (const char *message, gm_status_t error) |
GM_ENTRY_POINT int | gm_sleep (unsigned seconds) |
GM_ENTRY_POINT void | gm_exit (gm_status_t status) |
GM_ENTRY_POINT int | gm_printf (const char *format,...) |
GM_ENTRY_POINT char * | gm_strerror (gm_status_t error) |
GM_ENTRY_POINT gm_status_t | gm_set_enable_nack_down (struct gm_port *port, int flag) |
GM_ENTRY_POINT gm_status_t | gm_max_node_id_in_use (struct gm_port *port, unsigned int *n) |
GM_ENTRY_POINT int | gm_eprintf (const char *format,...) |
GM_ENTRY_POINT void * | gm_memset (void *s, int c, gm_size_t n) |
GM_ENTRY_POINT char * | gm_strdup (const char *) |
GM_ENTRY_POINT gm_status_t | gm_mark (struct gm_mark_set *set, gm_mark_t *m) |
GM_ENTRY_POINT int | gm_mark_is_valid (struct gm_mark_set *set, gm_mark_t *m) |
GM_ENTRY_POINT gm_status_t | gm_create_mark_set (struct gm_mark_set **set, unsigned long init_count) |
GM_ENTRY_POINT void | gm_destroy_mark_set (struct gm_mark_set *set) |
GM_ENTRY_POINT void | gm_unmark (struct gm_mark_set *set, gm_mark_t *m) |
GM_ENTRY_POINT void | gm_unmark_all (struct gm_mark_set *set) |
GM_ENTRY_POINT gm_status_t | gm_on_exit (gm_on_exit_callback_t, void *arg) |
GM_ENTRY_POINT void | gm_get (struct gm_port *p, gm_remote_ptr_t remote_buffer, void *local_buffer, gm_size_t len, enum gm_priority priority, unsigned int target_node_id, unsigned int target_port_id, gm_send_completion_callback_t callback, void *context) |
GM_ENTRY_POINT void | gm_put (struct gm_port *p, void *local_buffer, gm_remote_ptr_t remote_buffer, gm_size_t len, enum gm_priority priority, unsigned int target_node_id, unsigned int target_port_id, gm_send_completion_callback_t callback, void *context) |
GM_ENTRY_POINT gm_status_t | gm_global_id_to_node_id (struct gm_port *port, unsigned int global_id, unsigned int *node_id) |
GM_ENTRY_POINT gm_status_t | gm_node_id_to_global_id (struct gm_port *port, unsigned int node_id, unsigned int *global_id) |
GM_ENTRY_POINT gm_status_t | gm_node_id_to_host_name_ex (struct gm_port *port, unsigned int timeout_usecs, unsigned int node_id, char(*name)[GM_MAX_HOST_NAME_LEN+1]) |
GM_ENTRY_POINT gm_status_t | gm_host_name_to_node_id_ex (struct gm_port *port, unsigned int timeout_usecs, const char *host_name, unsigned int *node_id) |
Variables | |
GM_ENTRY_POINT const unsigned char | gm_log2_roundup_table [257] |
The official GM API include file.
author: glenn@myri.com
|
Hex equivalent of GM_API_VERSION_1_0 |
|
Hex equivalent of GM_API_VERSION_1_1 |
|
Hex equivalent of GM_API_VERSION_1_2 |
|
Hex equivalent of GM_API_VERSION_1_3 |
|
Hex equivalent of GM_API_VERSION_1_4 |
|
Hex equivalent of GM_API_VERSION_1_5 |
|
Hex equivalent of GM_API_VERSION_1_6 |
|
Hex equivalent of GM_API_VERSION_2_0 |
|
Hex equivalent of GM_API_VERSION_2_0_6 |
|
Set the default API version used in this file. |
|
Maximum length of GM host name |
|
Maximum length of GM port name |
|
No such GM node id |
|
Define all undefined GM_CPU switches to 0 to prevent problems with "gcc -Wundef" |
|
GM RDMA GRANULARITY |
|
GM MAX DMA GRANULARITY |
|
Given a pointer to an instance of a field in a structure of a certain type, return a pointer to the containing structure. |
|
Given an array, return the number of elements in the array. |
|
Return nonzero if the input is neither a power of two nor zero. Otherwise, return zero. |
|
Given a pointer to an instance of a field in a structure of a certain type, return a pointer to the containing structure. |
|
Given an array, return the number of elements in the array. |
|
Return nonzero if the input is neither a power of two nor zero. Otherwise, return zero. |
|
The "gm_up_t" is a LANai-compatible representation of a user virtual memory address. If the host has 32-bit pointers, then a gm_up_t has 32 bits. If the host has 64-bit pointers, but only 32-bits of these pointers are used, then a gm_up_t still has 32 bits (for performance reasons). Finally, if the host has 64-bit pointers and more than 32 bits of the pointer is used, then a gm_up_t has 64-bits. |
|
GM Send Completion Status codes |
|
gm_send_completion_callback_t typedef function. |
|
typedef for gm_pid_t. |
|
GM Send Completion Status codes
|
|
Priority Levels |
|
Receive Event Types
|
|
gm_abort() aborts the current process, and is a wrapper around the system function abort().
|
|
Allocates a send token (Details). |
|
gm_allow_remote_memory_access() allows any remote GM port to modify the contents of any GM DMAable memory using the gm_directed_send() function. This is a significant security hole, but is very useful on tightly coupled clusters on trusted networks.
|
|
gm_bcopy() copies len bytes starting at from to location to. This function does not handle overlapping regions.
|
|
Blocks until there is a receive event and then returns a pointer to the event. (Details). |
|
Like gm_blocking_receive(), except it sleeps the current thread immediately if no receive is pending. (gm_blocking_receive_no_spin "Details"). |
|
gm_bzero() clears the len bytes of memory starting at ptr. This function does not use partword I/O unless it must (for speed, especially when doing PIO), and does not rely on the system bzero() functionality, which may not be safe for PIO mapped memory.
|
|
gm_calloc() allocates and clears an array of cnt elements of length len.
|
|
Cancels alarm (Details). |
|
Closes a GM port (Details). |
|
Unreliable send (Details). |
|
Unreliable send of gm_u32_t messages (Details). |
|
Deregisters memory (Details). |
|
Directed send (PUT) (Details). |
|
gm_dma_calloc() allocates and clears count * length bytes of DMAable memory aligned on a 4-byte boundary. Memory should be freed using gm_dma_free().
|
|
Frees a region of DMAable memory (Details). |
|
gm_dma_malloc() allocates length bytes of DMAable memory aligned on a 4-byte boundary. Memory should be freed using gm_dma_free().
|
|
Flushes an alarm (Details). |
|
gm_free() frees the memory buffer at ptr, which was previously allocated by gm_malloc(), or gm_calloc().
|
|
Frees a send token (Details). |
|
Frees multiple send tokens (Details). |
|
Copies the host name of the local node (Details). |
|
Returns GM_GET_NODE_TYPE (Details). |
|
Copies the GM ID of the interface (Details). |
|
Copies the board ID of the interface (gm_get_unique_board_id "Details"). |
|
Copies copies the 6-byte ethernet address of the interface (Details). |
|
gm_hex_dump() prints the hex equivalent of data at _ptr.
|
|
This function is deprectated. Use gm_host_name_to_node_id_ex() instead. Returns the GM ID associated with a host_name (Details). |
|
Initializes user-allocated storage for an alarm. (Details). |
|
gm_isprint() is just like ANSI isprint(), only it works in the kernel and MCP.
|
|
gm_malloc() returns a pointer to the specified amount of memory. In the kernel, the memory will be nonpageable.
|
|
gm_page_alloc() returns a ptr to a newly allocated page-aligned buffer of length GM_PAGE_LEN.
|
|
gm_page_free() frees the page of memory at ptr previously allocated by gm_page_alloc(). If all pages have been freed, free all of the memory allocated for pages.
|
|
gm_alloc_pages() allocates a page-aligned buffer of length ALLOC_LEN, where ALLOC_LEN is a multiple of GM_PAGE_LEN. Any fractional page following the buffer is wasted.
|
|
gm_free_pages() frees the pages at addr, which were previously allocated with gm_alloc_pages().
|
|
gm_max_length_for_size() returns the maximum length of a message that will fit in a GM buffer of size size.
|
|
Stores the maximum GM node ID supported by the network interface card (Details). |
|
gm_memcmp() emulates the ANSI memcmp() function.
|
|
gm_memorize_message() is a wrapper around function memcpy(). gm_memorize_message() copies a message into a buffer if needed. If message and buffer differ, gm_memorize_message(port,message,buffer) copies the message pointed to by message into the buffer pointed to by buffer. gm_memorize_message() returns buffer. This function optionally optimizes the handling of FAST receive messages as described in "See Chapter 9 [Receiving Messages].
|
|
Returns the minimum supported message size (Details). |
|
gm_min_size_for_length() returns the minimum GM message buffer size required to store a message of length length.
|
|
gm_mtu() returns the value of GM_MTU.
|
|
This function is deprecated. Use gm_node_id_to_host_name_ex() instead. Returns a pointer to the host name of the host containing the network interface card with GM node id node_id. (Details). |
|
Stores the MAC address for the interface (gm_node_id_to_unique_id "Details"). |
|
Returns the number of ports supported by this build. (Details). |
|
Returns the number of send tokens for this port. (Details). |
|
Returns the number of receive tokens for this port. (Details). |
|
Returns the id of the GM port (Details). |
|
Opens a GM port on an interface (Details). |
|
Provides GM with a buffer into which it can receive messages (Details). |
|
Returns nonzero if a receive event is pending (gm_receive_pending "Details"). |
|
Returns the nonzero event type if an event is pending (Details). |
|
Returns a receive event. (Details). |
|
Registers virtual memory for DMA transfers. (gm_register_memory "Details"). |
|
Tests for the availability of a send token without allocating the send token. (Details). |
|
A fully asynchronous send. (Details). |
|
A fully asychronous send from/to the same GM port on the sending and receiving side. (Details). |
|
gm_set_acceptable_sizes() informs GM of the acceptable sizes of GM messages received on port p with priority priority. Each set bit of mask indicates an acceptable size. While calling this function is not required, clients should call it during program initialization to detect errors involving the reception of badly sized messages to be reported nearly instantaneously, rather than after a substantial delay of 30 seconds or more. Note: the MASK is a long to support larger than 2GByte packets (those with size larger than 31).
|
|
Sets an alarm, which may already be pending. (gm_set_alarm "Details"). |
|
gm_strlen() calculates the length of a string.
|
|
gm_strncpy() copies exactly n bytes, truncating src or adding null characters to dst if necessary. The result will not be null-terminated if the length of src is n or more.
|
|
gm_strcmp() reimplements strcmp().
|
|
gm_strncmp() reimplements strncmp().
|
|
gm_strncasecmp() reimplements strncasecmp().
|
|
gm_ticks() returns a 64-bit extended version of the LANai real time clock (RTC). For implementation reasons, the granularity of gm_ticks() is 50 microseconds at the application level.
|
|
Returns the board id number for an interface. (gm_unique_id "Details"). |
|
Returns the GM node id for a specific interface. (Details). |
|
GM Event Handler. (Details). |
|
_gm_get_route function. (Details). |
|
|
|
gm_register_buffer() registered a GM buffer.
|
|
gm_unregister_buffer() unregistered a GM buffer.
|
|
gm_create_lookaside() returns a newly created lookaside list to be used to allocate blocks of ENTRY_LEN bytes. MIN_ENTRY_CNT entries are preallocated.
|
|
gm_destroy_lookaside() frees a lookaside list and all associated resources, including any buffers currently allocated from the lookaside list.
|
|
gm_lookaside_alloc() allocates an entry from the lookaside table, with debugging. It returns a buffer of size ENTRY_LEN specified when the entry list L was created, or `0' if the buffer could not be allocated.
|
|
gm_lookaside_zalloc() allocates and clear an entry from the lookaside table.
|
|
gm_lookaside_free() schedules an allocated entry to be freed, and actually performs any scheduled free. It frees a block of memory previously allocated by a call to gm_lookaside_alloc(). The contents of the block of memory are guaranteed to be unchanged until the next operation is performed on the lookaside list.
|
|
Creates a hash table. (Details). |
|
gm_destroy_hash() frees all resources associated with the hash table, except for any client-allocated buffers.
|
|
Removes an entry from the hash table. (Details). |
|
Finds an entry in the hash table. (Details). |
|
Inserts an entry in the hash table. (Details). |
|
Replaces a key in the hash table. (Details). |
|
gm_hash_compare_strings() is the function used to compare two strings.
|
|
gm_hash_hash_string() is the function used to hash keys.
|
|
gm_hash_compare_longs() is the function used to compare two longs.
|
|
gm_hash_hash_long() is the function used to hash keys.
|
|
gm_hash_compare_ints() is the function used to compare two ints.
|
|
gm_hash_hash_int() is the function used to hash keys.
|
|
gm_hash_compare_ptrs() is the function used to compare two ptrs.
|
|
gm_hash_hash_ptr() is the function used to hash keys.
|
|
gm_crc() computes a CRC-32 of the indicated range of memory.
|
|
gm_crc_str() computes a CRC-32 for the indicated string.
|
|
gm_rand() returns a pseudo-random integer, using a poor but fast random number generator.
|
|
gm_srand() returns a pseudo-random integer, and requires a seed for the random number generator.
|
|
gm_rand_mod() returns a pseudo-random number modulo modulus, using a poor but fast random number generator.
|
|
gm_init() initializes GM. It increments the GM initialization counter and initializes GM if it was uninitialized. This call must be performed before any other GM call and before any reference to a GM global variable (e.g.: GM_PAGE_LEN). Each call to gm_init() should be matched by a call to gm_finalize().
|
|
gm_finalize() decrements the GM initialization counter and if it becomes zero, frees all resources associated with GM in the current process. Each call to gm_finalize() should be matched by a call to gm_init().
|
|
gm_log2_roundup() returns the logarithm, base 2, of n, rounding up to the next integer.
|
|
gm_create_mutex() creates a GM mutex.
|
|
gm_destroy_mutex() destroys a GM mutex.
|
|
|
|
|
|
|
|
|
|
|
|
gm_zone_malloc() mallocs a GM zone.
|
|
gm_zone_calloc() callocs a GM zone.
|
|
|
|
gm_resume_sending(0 reenables packet transmission of messages from port of priority priority destined for target_port_id of target_node_id. This function should only be called after an error is reported to a send completion callback routine. The message that generated the error is not resent. The first four parameters must match those of the failed send. It should be called only once per reported error. This function requires a send token, which will be returned to the client in the callback function. gm_resume_sending() and gm_drop_sends(), as most gm requests, require a send token, and the callback you give to them is just meant to return this token. These gm_requests always succeed (if called in a valid manner), so the callback will always be called with GM_SUCCESS (which here does not mean at all that something was sent successfully, just that the request has been taken into account, and the token used for that request was recycled).
|
|
gm_drop_sends() drops all enqueued sends for port of priority priority destined for target_port_id of target_node_id to be dropped, and reenable packet transmission on that connection. This function should only be called after an error is reported to a send completion callback routine. The first four parameters must match those of the failed send. It should be called only once per reported error. This function requires a send token, which will be returned to the client in the callback function. The dropped sends will then be returned to the client with a status of GM_SEND_DROPPED. gm_drop_sends() and gm_resume_sending(), as most gm requests, require a send token, and the callback you give to them is just meant to return this token. These gm_requests always succeed (if called in a valid manner), so the callback will always be called with GM_SUCCESS (which here does not mean at all that something was sent successfully, just that the request has been taken into account, and the token used for that request was recycled).
|
|
gm_getpid() is a cover for the usual Unix getpid() functionality.
|
|
gm_directcopy_get() copies data of length length bytes, specified at the address source_addr of the local process using the port port_id of the board source_instance_id to the memory area specified at the address target_addr of the current process. This implementation bypasses all of the protection of the operating system to provide a memory copy from one process's memory space to another one. The memory areas must have been registered by GM prior to calling this function in order to lock memory pages at their physical locations. There are no alignment or length constraints but the maximum performance will be reached with aligned addresses on both sides. This function is supported exclusively on Linux.
|
|
gm_perror() is similar to ANSI perror(), but takes the error code as a parameter to allow thread safety in future implementations, and only supports GM error numbers. Prints message followed by a description of errno.
|
|
gm_sleep() emulates the ANSI standard sleep(), sleeping the entire process for seconds seconds.
|
|
gm_exit() causes the current process to exit with a status appropriate to the GM status code status.
|
|
gm_printf() emulates or invokes the ANSI standard printf() function.
|
|
gm_strerror() is an error function for GM. The error is only valid until next call to this function.
|
|
|
|
Returns the maximum GM node ID that is in use by the network attached to the port. (Details). |
|
gm_eprintf() emulates or invokes the ANSI standard vprintf() function.
|
|
gm_memset() reimplements the UNIX function memset().
|
|
gm_strdup() reimplements the UNIX function strdup().
|
|
gm_mark() adds `*MARK' to SET. Requires O(constant) time if the mark set has preallocated resources for the mark. Otherwise, requires O(constant) average time.
|
|
gm_mark_is_valid() returns nonzero value if `*MARK' is in SET. Requires O(constant) time.
|
|
gm_create_mark_set() returns a pointer to a new mark set at SET with enough preallocated resources to support INIT_COUNT. Returns GM_SUCCESS on success. Requires time comparable to malloc().
|
|
gm_destroy_mark_set() frees all resources associated with mark set `*SET'. Requires time comparable to free().
|
|
gm_unmark() removes `*MARK' from SET. Requires O(constant) time.
|
|
gm_unmark_all() unmarks all marks for the mark set, freeing all but the initial number of preallocated mark references. Removes all marks from SET. Requires O(constant) time.
|
|
gm_on_exit() is like Linux on_exit(). This function registers a callback so that `CALLBACK(STATUS,ARG)' is called when the program exits. Callbacks are called in the reverse of the order of registration. This function is also somewhat similar to BSD `atexit()'. Call the callbacks in the reverse order registered inside gm_exit(), passing GM exit status and registered argument to the callback.
|
|
RDMA Read Operation (GET) (Details). |
|
Directed send (PUT) (Details). |
|
Stores at *node_id the local connection ID corresponding to the connection to global_id. (gm_global_id_to_node_id "Details"). |
|
Stores at *global_id the global node ID corresponding to the connection identified by the local connection ID. (Details). |
|
Store at *name the host name of the host containing the network interface card with GM node id node_id. (Details). |
|
Store at *node_id the node ID of the host containing the network interface card with GM host name host_name. (Details). |
|
Log 2 roundup table. (Details). |