Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

gm.h File Reference

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_lookasidegm_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_hashgm_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_zonegm_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]


Detailed Description

The official GM API include file.

author: glenn@myri.com


Define Documentation

#define GM_API_VERSION_1_0   0x100
 

Hex equivalent of GM_API_VERSION_1_0

#define GM_API_VERSION_1_1   0x101
 

Hex equivalent of GM_API_VERSION_1_1

#define GM_API_VERSION_1_2   0x102
 

Hex equivalent of GM_API_VERSION_1_2

#define GM_API_VERSION_1_3   0x103
 

Hex equivalent of GM_API_VERSION_1_3

#define GM_API_VERSION_1_4   0x104
 

Hex equivalent of GM_API_VERSION_1_4

#define GM_API_VERSION_1_5   0x105
 

Hex equivalent of GM_API_VERSION_1_5

#define GM_API_VERSION_1_6   0x106
 

Hex equivalent of GM_API_VERSION_1_6

#define GM_API_VERSION_2_0   0x200
 

Hex equivalent of GM_API_VERSION_2_0

#define GM_API_VERSION_2_0_6   0x20006
 

Hex equivalent of GM_API_VERSION_2_0_6

#define GM_API_VERSION   GM_API_VERSION_2_0_6
 

Set the default API version used in this file.

#define GM_MAX_HOST_NAME_LEN   128
 

Maximum length of GM host name

#define GM_MAX_PORT_NAME_LEN   32
 

Maximum length of GM port name

#define GM_NO_SUCH_NODE_ID   0
 

No such GM node id

#define GM_CPU_alpha   0
 

Define all undefined GM_CPU switches to 0 to prevent problems with "gcc -Wundef"

#define GM_RDMA_GRANULARITY   64
 

GM RDMA GRANULARITY

#define GM_MAX_DMA_GRANULARITY   8
 

GM MAX DMA GRANULARITY

#define GM_STRUCT_CONTAINING type,
field,
field_instance       ((type *)((char *)(field_instance) - GM_OFFSETOF (type, field)))
 

Given a pointer to an instance of a field in a structure of a certain type, return a pointer to the containing structure.

#define GM_NUM_ELEM ar       (sizeof (ar) / sizeof (*ar))
 

Given an array, return the number of elements in the array.

#define GM_POWER_OF_TWO      (!((n)&((n)-1)))
 

Return nonzero if the input is neither a power of two nor zero. Otherwise, return zero.

#define GM_STRUCT_CONTAINING type,
field,
field_instance       ((type *)((char *)(field_instance) - GM_OFFSETOF (type, field)))
 

Given a pointer to an instance of a field in a structure of a certain type, return a pointer to the containing structure.

#define GM_NUM_ELEM ar       (sizeof (ar) / sizeof (*ar))
 

Given an array, return the number of elements in the array.

#define GM_POWER_OF_TWO      (!((n)&((n)-1)))
 

Return nonzero if the input is neither a power of two nor zero. Otherwise, return zero.


Typedef Documentation

typedef gm_u64_t gm_remote_ptr_t
 

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.

typedef enum gm_status gm_status_t
 

GM Send Completion Status codes

typedef void(* gm_send_completion_callback_t)(struct gm_port * p, void *context, gm_status_t status)
 

gm_send_completion_callback_t typedef function.

typedef gm_u32_t gm_pid_t
 

typedef for gm_pid_t.


Enumeration Type Documentation

enum gm_status
 

GM Send Completion Status codes

Enumeration values:
GM_SUCCESS  The send succeeded. This status code does not indicate an error.
GM_FAILURE  Operation Failed
GM_INPUT_BUFFER_TOO_SMALL  Input buffer is too small
GM_OUTPUT_BUFFER_TOO_SMALL  Output buffer is too small
GM_TRY_AGAIN  Try Again
GM_BUSY  GM Port is Busy
GM_MEMORY_FAULT  Memory Fault
GM_INTERRUPTED  Interrupted
GM_INVALID_PARAMETER  Invalid input parameter
GM_OUT_OF_MEMORY  Out of Memory
GM_INVALID_COMMAND  Invalid Command
GM_PERMISSION_DENIED  Permission Denied
GM_INTERNAL_ERROR  Internal Error
GM_UNATTACHED  Unattached
GM_UNSUPPORTED_DEVICE  Unsupported Device
GM_SEND_TIMED_OUT  The target port is open and responsive and the message is of an acceptable size, but the receiver failed to provide a matching receive buffer within the timeout period. This error can be caused by the receive neglecting its responsibility to provide receive buffers in a timely fashion or crashing. It can also be caused by severe congestion at the receiving node where many senders are contending for the same receive buffers on the target port for an extended period. This error indicates a programming error in the client software.
GM_SEND_REJECTED  The receiver indicated (in a call to gm_set_acceptable_sizes()) the size of the message was unacceptable. This error indicates a programming error in the client software.
GM_SEND_TARGET_PORT_CLOSED  The message cannot be delivered because the destination port has been closed.
GM_SEND_TARGET_NODE_UNREACHABLE  The target node could not be reached over the Myrinet. This error can be caused by the network becoming disconnected for too long, the remote node being powered off, or by network links being rearranged when the Myrinet mapper is not running.
GM_SEND_DROPPED  The send was dropped at the client's request. (The client called gm_drop_sends().) This status code does not indicate an error.
GM_SEND_PORT_CLOSED  Clients should never see this internal error code.
GM_NODE_ID_NOT_YET_SET  Node ID is not yet set
GM_STILL_SHUTTING_DOWN  GM Port is still shutting down
GM_CLONE_BUSY  GM Clone Busy
GM_NO_SUCH_DEVICE  No such device
GM_ABORTED  Aborted.
GM_INCOMPATIBLE_LIB_AND_DRIVER  Incompatible GM library and driver
GM_UNTRANSLATED_SYSTEM_ERROR  Untranslated System Error
GM_ACCESS_DENIED  Access Denied
GM_NO_DRIVER_SUPPORT  No Driver Support
GM_PTE_REF_CNT_OVERFLOW  PTE Ref Cnt Overflow
GM_NOT_SUPPORTED_IN_KERNEL  Not supported in the kernel
GM_NOT_SUPPORTED_ON_ARCH  Not supported for this architecture
GM_NO_MATCH  No match
GM_USER_ERROR  User error
GM_TIMED_OUT  Timed out
GM_DATA_CORRUPTED  Data has been corrupted
GM_HARDWARE_FAULT  Hardware fault
GM_SEND_ORPHANED  Send orphaned
GM_MINOR_OVERFLOW  Minor overflow
GM_PAGE_TABLE_FULL  Page Table is Full
GM_UC_ERROR  UC Error
GM_INVALID_PORT_NUMBER  Invalid Port Number
GM_DEV_NOT_FOUND  No device files found
GM_FIRMWARE_NOT_RUNNING  Lanai not running
GM_YP_NO_MATCH  No match for yellow pages query.

enum gm_priority
 

Priority Levels

Enumeration values:
GM_LOW_PRIORITY  Low priority message
GM_HIGH_PRIORITY  High priority message
GM_NUM_PRIORITIES  Number of priority types

enum gm_recv_event_type
 

Receive Event Types

Enumeration values:
GM_NO_RECV_EVENT  No significant receive event is pending.
GM_SENDS_FAILED_EVENT  deprecated
GM_ALARM_EVENT  This event should be treated as an unknown event (passed to gm_unknown())
GM_RECV_EVENT  This event indicates that a normal receive (GM_LOW_PRIORITY) has occurred.
GM_HIGH_RECV_EVENT  This event indicates that a normal receive (GM_HIGH_PRIORITY) has occurred.
GM_PEER_RECV_EVENT  This event indicates that a normal receive (GM_LOW_PRIORITY) has occurred, and the PEER indicates that the sender/receiver ports are the same.
GM_HIGH_PEER_RECV_EVENT  This event indicates that a normal receive (GM_HIGH_PRIORITY) has occurred, and the PEER indicates that the sender/receiver ports are the same.
GM_FAST_RECV_EVENT  A small-message receive occurred (GM_LOW_PRIORITY) with the small message stored in the receive queue for improved small-message performance.
GM_FAST_HIGH_RECV_EVENT  A small-message receive occurred (GM_HIGH_PRIORITY) with the small message stored in the receive queue for improved small-message performance.
GM_FAST_PEER_RECV_EVENT  A small-message receive occurred (GM_LOW_PRIORITY) with the small message stored in the receive queue for improved small-message performance. The PEER indicates that the sender/receiver ports are the same.
GM_FAST_HIGH_PEER_RECV_EVENT  A small-message receive occurred (GM_HIGH_PRIORITY) with the small message stored in the receive queue for improved small-message performance. The PEER indicates that the sender/receiver ports are the same.
GM_NEW_SENDS_FAILED_EVENT  deprecated
GM_NEW_RECV_EVENT  normal receives
GM_NEW_FAST_RECV_EVENT  streamlined small message receives
_GM_NEW_PUT_NOTIFICATION_EVENT  Directed send notification
GM_NUM_RECV_EVENT_TYPES  DO NOT add new types here.


Function Documentation

GM_ENTRY_POINT void gm_abort void   
 

gm_abort() aborts the current process, and is a wrapper around the system function abort().

See also:
gm_init gm_open gm_close gm_exit gm_finalize
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT int gm_alloc_send_token struct gm_port *    p,
unsigned int    priority
 

Allocates a send token (Details).

GM_ENTRY_POINT gm_status_t gm_allow_remote_memory_access struct gm_port *    port
 

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.

Return values:
GM_SUCCESS  Operation completed successfully.
Parameters:
port  (IN) Handle to the GM port.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_bcopy const void *    from,
void *    to,
gm_size_t    len
 

gm_bcopy() copies len bytes starting at from to location to. This function does not handle overlapping regions.

Parameters:
from  (IN) The starting location for the region to be copied.
to  (IN) The ending location for the region to be copied.
len  (IN) The length in bytes of the region to be copied.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT union gm_recv_event* gm_blocking_receive struct gm_port *    p
 

Blocks until there is a receive event and then returns a pointer to the event. (Details).

GM_ENTRY_POINT union gm_recv_event* gm_blocking_receive_no_spin struct gm_port *    p
 

Like gm_blocking_receive(), except it sleeps the current thread immediately if no receive is pending. (gm_blocking_receive_no_spin "Details").

GM_ENTRY_POINT void gm_bzero void *    ptr,
gm_size_t    len
 

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.

Parameters:
ptr  (IN) The pointer to the memory location.
len  (IN) The number of bytes of memory to be bzero'ed.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void* gm_calloc gm_size_t    len,
gm_size_t    cnt
 

gm_calloc() allocates and clears an array of cnt elements of length len.

Parameters:
len  (IN) The number of bytes in each element.
cnt  (IN) The number of elements in the array.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_cancel_alarm struct gm_alarm *    gm_alarm
 

Cancels alarm (Details).

GM_ENTRY_POINT void gm_close struct gm_port *    p
 

Closes a GM port (Details).

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
 

Unreliable send (Details).

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
 

Unreliable send of gm_u32_t messages (Details).

GM_ENTRY_POINT gm_status_t gm_deregister_memory struct gm_port *    p,
void *    ptr,
gm_size_t    length
 

Deregisters memory (Details).

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
 

Directed send (PUT) (Details).

GM_ENTRY_POINT void* gm_dma_calloc struct gm_port *    p,
gm_size_t    count,
gm_size_t    length
 

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

Parameters:
p  (IN) Handle to the GM port.
count  (IN) The number of elements to be calloc'ed.
length  (IN) The size of each element to be calloc'ed.
See also:
gm_dma_malloc gm_dma_free
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_dma_free struct gm_port *    p,
void *    addr
 

Frees a region of DMAable memory (Details).

GM_ENTRY_POINT void* gm_dma_malloc struct gm_port *    p,
gm_size_t    length
 

gm_dma_malloc() allocates length bytes of DMAable memory aligned on a 4-byte boundary. Memory should be freed using gm_dma_free().

Parameters:
p  (IN) Handle to the GM port.
length  (IN) The number of bytes to be malloc'ed.
See also:
gm_dma_calloc gm_dma_free
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_flush_alarm struct gm_port *    p
 

Flushes an alarm (Details).

GM_ENTRY_POINT void gm_free void *    ptr
 

gm_free() frees the memory buffer at ptr, which was previously allocated by gm_malloc(), or gm_calloc().

Parameters:
ptr  (IN) Address of the memory to be freed.
See also:
gm_malloc gm_calloc
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_free_send_token struct gm_port *    p,
unsigned int    priority
 

Frees a send token (Details).

GM_ENTRY_POINT void gm_free_send_tokens struct gm_port *    p,
unsigned int    priority,
unsigned int    count
 

Frees multiple send tokens (Details).

GM_ENTRY_POINT gm_status_t gm_get_host_name struct gm_port *    port,
char    name[GM_MAX_HOST_NAME_LEN]
 

Copies the host name of the local node (Details).

GM_ENTRY_POINT gm_status_t gm_get_node_type struct gm_port *    port,
int *    node_type
 

Returns GM_GET_NODE_TYPE (Details).

GM_ENTRY_POINT gm_status_t gm_get_node_id struct gm_port *    port,
unsigned int *    n
 

Copies the GM ID of the interface (Details).

GM_ENTRY_POINT gm_status_t gm_get_unique_board_id struct gm_port *    port,
char    unique[6]
 

Copies the board ID of the interface (gm_get_unique_board_id "Details").

GM_ENTRY_POINT gm_status_t gm_get_mapper_unique_id struct gm_port *    port,
char    unique[6]
 

Copies copies the 6-byte ethernet address of the interface (Details).

GM_ENTRY_POINT void gm_hex_dump const void *    _ptr,
gm_size_t    len
 

gm_hex_dump() prints the hex equivalent of data at _ptr.

Parameters:
_ptr  (IN) Address of the data.
len  (IN) The length (in bytes) of the data.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT unsigned int gm_host_name_to_node_id struct gm_port *    port,
char *    _host_name
 

This function is deprectated. Use gm_host_name_to_node_id_ex() instead. Returns the GM ID associated with a host_name (Details).

GM_ENTRY_POINT void gm_initialize_alarm struct gm_alarm *    my_alarm
 

Initializes user-allocated storage for an alarm. (Details).

GM_ENTRY_POINT int gm_isprint int    c
 

gm_isprint() is just like ANSI isprint(), only it works in the kernel and MCP.

Return values:
int  The return value is nonzero if the character is a printable character including a space, and a zero value if not.
Parameters:
c  (OUT) Printable character.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void* gm_malloc gm_size_t    len
 

gm_malloc() returns a pointer to the specified amount of memory. In the kernel, the memory will be nonpageable.

Return values:
ptr  Pointer to the specified amount of memory.
Parameters:
len  (IN) The length in bytes to be malloc'ed.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void* gm_page_alloc void   
 

gm_page_alloc() returns a ptr to a newly allocated page-aligned buffer of length GM_PAGE_LEN.

Return values:
ptr  Page-aligned buffer of length GM_PAGE_LEN.
See also:
gm_page_free
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_page_free void *    ptr
 

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.

Parameters:
ptr  (IN) Address of the memory page to be freed.
See also:
gm_page_alloc
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void* gm_alloc_pages gm_size_t    alloc_len
 

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.

Return values:
ptr  Pointer to the allocated buffer.
0  Error occurred.
Parameters:
alloc_len  (IN) The length of buffer to be allocated.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_free_pages void *    addr,
gm_size_t    alloc_len
 

gm_free_pages() frees the pages at addr, which were previously allocated with gm_alloc_pages().

Parameters:
addr  (IN) The address of the buffer to be freed.
alloc_len  (IN) The length (in bytes) of the buffer to be freed.
See also:
gm_alloc_pages
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT gm_size_t gm_max_length_for_size unsigned int    size
 

gm_max_length_for_size() returns the maximum length of a message that will fit in a GM buffer of size size.

Return values:
gm_size_t 
Parameters:
size  (IN) The size of the GM buffer.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT gm_status_t gm_max_node_id struct gm_port *    port,
unsigned int *    n
 

Stores the maximum GM node ID supported by the network interface card (Details).

GM_ENTRY_POINT int gm_memcmp const void *    _a,
const void *    _b,
gm_size_t    len
 

gm_memcmp() emulates the ANSI memcmp() function.

Return values:
int  Returns an integer less than, equal to, or greater than zero if the first len bytes of a is found, respectively, to be less than, to match, or be greater than the first len bytes of b.
Parameters:
a  (IN) The first memory area for comparison.
b  (IN) The second memory area for comparison.
len  (IN) The number of bytes to compare.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void* gm_memorize_message void *    message,
void *    buffer,
unsigned    len
 

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].

Return values:
something 
Parameters:
message  (IN) Address of the message to be copied.
buffer  (OUT) Address where the message is to be copied.
len  (IN) The length in bytes of the message to be copied.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT unsigned int gm_min_message_size struct gm_port *    port
 

Returns the minimum supported message size (Details).

GM_ENTRY_POINT unsigned int gm_min_size_for_length gm_size_t    length
 

gm_min_size_for_length() returns the minimum GM message buffer size required to store a message of length length.

Return values:
gm_log2_roundup 
Parameters:
length  (IN) The length of the message.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT unsigned int gm_mtu struct gm_port *    port
 

gm_mtu() returns the value of GM_MTU.

Return values:
GM_MTU 
Parameters:
port  (IN) The handle to the GM port.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT char* gm_node_id_to_host_name struct gm_port *    port,
unsigned int    node_id
 

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

GM_ENTRY_POINT gm_status_t gm_node_id_to_unique_id struct gm_port *    port,
unsigned int    n,
char    unique[6]
 

Stores the MAC address for the interface (gm_node_id_to_unique_id "Details").

GM_ENTRY_POINT unsigned int gm_num_ports struct gm_port *    p
 

Returns the number of ports supported by this build. (Details).

GM_ENTRY_POINT unsigned int gm_num_send_tokens struct gm_port *    p
 

Returns the number of send tokens for this port. (Details).

GM_ENTRY_POINT unsigned int gm_num_receive_tokens struct gm_port *    p
 

Returns the number of receive tokens for this port. (Details).

GM_ENTRY_POINT unsigned int gm_get_port_id struct gm_port *    p
 

Returns the id of the GM port (Details).

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
 

Opens a GM port on an interface (Details).

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
 

Provides GM with a buffer into which it can receive messages (Details).

GM_ENTRY_POINT int gm_receive_pending struct gm_port *    p
 

Returns nonzero if a receive event is pending (gm_receive_pending "Details").

GM_ENTRY_POINT int gm_next_event_peek struct gm_port *    p,
gm_u16_t *    sender
 

Returns the nonzero event type if an event is pending (Details).

GM_ENTRY_POINT union gm_recv_event* gm_receive struct gm_port *    p
 

Returns a receive event. (Details).

GM_ENTRY_POINT gm_status_t gm_register_memory struct gm_port *    p,
void *    ptr,
gm_size_t    length
 

Registers virtual memory for DMA transfers. (gm_register_memory "Details").

GM_ENTRY_POINT int gm_send_token_available struct gm_port *    p,
unsigned int    priority
 

Tests for the availability of a send token without allocating the send token. (Details).

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
 

A fully asynchronous send. (Details).

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
 

A fully asychronous send from/to the same GM port on the sending and receiving side. (Details).

GM_ENTRY_POINT gm_status_t gm_set_acceptable_sizes struct gm_port *    p,
enum gm_priority    priority,
gm_size_t    mask
 

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

Return values:
GM_SUCCESS  Operation completed successfully.
GM_PERMISSION_DENIED  Port number hasn't been set.
GM_INTERNAL_ERROR  LANai is not running.
GM_INVALID_PARAMETER  The priority has an invalid value.
Parameters:
p  (IN) The GM port in use.
priority  (IN) The priority of the message.
mask 
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

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
 

Sets an alarm, which may already be pending. (gm_set_alarm "Details").

GM_ENTRY_POINT gm_size_t gm_strlen const char *    cptr
 

gm_strlen() calculates the length of a string.

Return values:
gm_size_t  The length of the string.
Parameters:
cptr  (IN) The string.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT char* gm_strncpy char *    to,
const char *    from,
int    len
 

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.

Return values:
char  * Returns a pointer to a destination string.
Parameters:
to  (IN) The destination string to be copied.
from  (IN) The source string to be copied.
len  (IN) The number of bytes to be copied.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT int gm_strcmp const char *    a,
const char *    b
 

gm_strcmp() reimplements strcmp().

Return values:
int  Returns an integer less than, equal to, or greater than zero if a is found, respectively, to be less than, to match, or be greater than b.
Parameters:
a  The first string to be compared.
b  The second string to be compared.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT int gm_strncmp const char *    a,
const char *    b,
int    len
 

gm_strncmp() reimplements strncmp().

Return values:
int  Returns an integer less than, equal to, or greater than zero if the first len bytes of a is found, respectively, to be less than, to match, or be greater than b.
Parameters:
a  (IN) The first string to be compared.
b  (IN) The second string to be compared.
len  (IN) The length in bytes.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT int gm_strncasecmp const char *    a,
const char *    b,
int    len
 

gm_strncasecmp() reimplements strncasecmp().

Return values:
int  Returns an integer less than, equal to, or greater than zero if the first len bytes of a is found, respectively, to be less than, to match, or be greater than b.
Parameters:
a  (IN) The first string to be compared.
b  (IN) The second string to be compared.
len  (IN) The number of bytes.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT gm_u64_t gm_ticks struct gm_port *    port
 

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.

Return values:
gm_u64_t 
Parameters:
port  (IN) The handle to the GM port.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT gm_status_t gm_unique_id struct gm_port *    port,
char    unique[6]
 

Returns the board id number for an interface. (gm_unique_id "Details").

GM_ENTRY_POINT gm_status_t gm_unique_id_to_node_id struct gm_port *    port,
char    unique[6],
unsigned int *    node_id
 

Returns the GM node id for a specific interface. (Details).

GM_ENTRY_POINT void gm_unknown struct gm_port *    p,
union gm_recv_event *    e
 

GM Event Handler. (Details).

GM_ENTRY_POINT gm_status_t _gm_get_route struct gm_port *    p,
unsigned int    node_id,
char *    route,
unsigned int *    len
 

_gm_get_route function. (Details).

GM_ENTRY_POINT void gm_dump_buffers void   
 

gm_dump_buffers()

Author:
??
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_register_buffer void *    addr,
int    size
 

gm_register_buffer() registered a GM buffer.

Return values:
1 
0 
Parameters:
addr  (IN) Address of data to be registered.
size  (IN) Size of buffer to be registered.
Author:
??
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT int gm_unregister_buffer void *    addr,
int    size
 

gm_unregister_buffer() unregistered a GM buffer.

Return values:
1 
0 
Parameters:
addr  (IN) Address of data to be freed.
size  (IN) Size of buffer to be freed.
Author:
??
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT struct gm_lookaside* gm_create_lookaside gm_size_t    entry_len,
gm_size_t    min_entry_cnt
 

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.

Return values:
gm_lookaside  Handle to the lookaside table.
Parameters:
entry_len  (IN)
min_entry_cnt  (IN)
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_destroy_lookaside struct gm_lookaside   l
 

gm_destroy_lookaside() frees a lookaside list and all associated resources, including any buffers currently allocated from the lookaside list.

Parameters:
l  (IN) Handle to the lookaside table.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void* gm_lookaside_alloc struct gm_lookaside   l
 

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.

Return values:
ptr  Buffer of size ENTRY_LEN.
Parameters:
l  (IN) Handle to the gm_lookaside list.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void* gm_lookaside_zalloc struct gm_lookaside   l
 

gm_lookaside_zalloc() allocates and clear an entry from the lookaside table.

Return values:
ptr 
Parameters:
l  (IN) Handle to the gm_lookaside list.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_lookaside_free void *    ptr
 

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.

Parameters:
ptr  (IN) Pointer to the entry to be freed.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

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
 

Creates a hash table. (Details).

GM_ENTRY_POINT void gm_destroy_hash struct gm_hash   hash
 

gm_destroy_hash() frees all resources associated with the hash table, except for any client-allocated buffers.

Parameters:
hash  (IN) Handle to the hash table.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void* gm_hash_remove struct gm_hash   hash,
void *    key
 

Removes an entry from the hash table. (Details).

GM_ENTRY_POINT void* gm_hash_find struct gm_hash   hash,
void *    key
 

Finds an entry in the hash table. (Details).

GM_ENTRY_POINT gm_status_t gm_hash_insert struct gm_hash   hash,
void *    key,
void *    datum
 

Inserts an entry in the hash table. (Details).

GM_ENTRY_POINT void gm_hash_rekey struct gm_hash   hash,
void *    old_key,
void *    new_key
 

Replaces a key in the hash table. (Details).

GM_ENTRY_POINT long gm_hash_compare_strings void *    key1,
void *    key2
 

gm_hash_compare_strings() is the function used to compare two strings.

Return values:
long 
Parameters:
key1  (IN) The key for the first string.
key2  (IN) The key for the second string.
See also:
gm_hash_compare_ints gm_hash_compare_longs gm_hash_compare_ptrs
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT unsigned long gm_hash_hash_string void *    key
 

gm_hash_hash_string() is the function used to hash keys.

Return values:
long 
Parameters:
key  (IN) The key for the string in the hash table.
See also:
gm_hash_compare_string gm_hash_hash_int gm_hash_hash_long gm_hash_hash_ptr
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT long gm_hash_compare_longs void *    key1,
void *    key2
 

gm_hash_compare_longs() is the function used to compare two longs.

Return values:
long 
Parameters:
key1  (IN)
key2  (IN)
See also:
gm_hash_compare_ints gm_hash_compare_strings gm_hash_compare_ptrs
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT unsigned long gm_hash_hash_long void *    key
 

gm_hash_hash_long() is the function used to hash keys.

Return values:
long 
Parameters:
key  (IN)
See also:
gm_hash_compare_long gm_hash_hash_int gm_hash_hash_string gm_hash_hash_ptr
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT long gm_hash_compare_ints void *    key1,
void *    key2
 

gm_hash_compare_ints() is the function used to compare two ints.

Return values:
long 
Parameters:
key1  (IN) The key for the first int.
key2  (IN) The key for the second int.
See also:
gm_hash_compare_longs gm_hash_compare_strings gm_hash_compare_ptrs
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT unsigned long gm_hash_hash_int void *    key
 

gm_hash_hash_int() is the function used to hash keys.

Return values:
long 
Parameters:
key  (IN)
See also:
gm_hash_compare_int gm_hash_hash_ptr gm_hash_hash_long gm_hash_hash_string
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT long gm_hash_compare_ptrs void *    key1,
void *    key2
 

gm_hash_compare_ptrs() is the function used to compare two ptrs.

Return values:
long 
Parameters:
key1  (IN) The key for the first ptr.
key2  (IN) The key for the second ptr.
See also:
gm_hash_compare_longs gm_hash_compare_strings gm_hash_compare_ints
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT unsigned long gm_hash_hash_ptr void *    key
 

gm_hash_hash_ptr() is the function used to hash keys.

Return values:
long 
Parameters:
key  (IN)
See also:
gm_hash_compare_ptr gm_hash_hash_int gm_hash_hash_long gm_hash_hash_string
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT unsigned long gm_crc void *    _ptr,
gm_size_t    len
 

gm_crc() computes a CRC-32 of the indicated range of memory.

Return values:
long 
Parameters:
_ptr  (IN) Pointer to a range of memory.
len  (IN) The length of the indicated range of memory.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT unsigned long gm_crc_str const char *    ptr
 

gm_crc_str() computes a CRC-32 for the indicated string.

Return values:
long 
Parameters:
ptr  (IN) Pointer to a string.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT int gm_rand void   
 

gm_rand() returns a pseudo-random integer, using a poor but fast random number generator.

Return values:
RANDOM_NUMBER  The random number that was generated.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_srand int    seed
 

gm_srand() returns a pseudo-random integer, and requires a seed for the random number generator.

Parameters:
seed  (IN) Seed for the random number generator.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT unsigned int gm_rand_mod unsigned int    a
 

gm_rand_mod() returns a pseudo-random number modulo modulus, using

a poor but fast random number generator.

Return values:
RANDOM_NUMBER 
Parameters:
a  (IN) The modulus bound.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT gm_status_t gm_init void   
 

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

Return values:
GM_SUCCESS  Operation completed successfully.
GM_FAILURE  Error occurred.
See also:
gm_finalize gm_open gm_close gm_exit gm_abort
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_finalize void   
 

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

See also:
gm_init gm_open gm_close gm_abort gm_exit
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT unsigned long gm_log2_roundup unsigned long    n
 

gm_log2_roundup() returns the logarithm, base 2, of n, rounding up to the next integer.

Return values:
LOG 
Parameters:
n  (IN) The integer for which the logarithm will be computed.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT struct gm_mutex* gm_create_mutex void   
 

gm_create_mutex() creates a GM mutex.

Return values:
gm_mutex  (OUT) Handle to the GM mutex.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_destroy_mutex struct gm_mutex *    mu
 

gm_destroy_mutex() destroys a GM mutex.

Parameters:
mu  (IN) The handle to the GM mutex.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_mutex_enter struct gm_mutex *    mu
 

gm_mutex_enter()

Parameters:
mu  (IN) The handle to the GM mutex.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_mutex_exit struct gm_mutex *    mu
 

gm_mutex_exit()

Parameters:
mu  (IN) The handle to the GM mutex.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT struct gm_zone* gm_zone_create_zone void *    base,
gm_size_t    length
 

gm_zone_create_zone()

Return values:
gm_zone  Handle to the GM zone.
Parameters:
base 
length 
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_zone_destroy_zone struct gm_zone   zone
 

gm_zone_destroy_zone()

Parameters:
zone  (IN) Pointer to the GM zone.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void* gm_zone_free struct gm_zone   zone,
void *    a
 

gm_zone_free()

Parameters:
zone  (IN) Pointer to the GM zone.
a 
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void* gm_zone_malloc struct gm_zone   zone,
gm_size_t    length
 

gm_zone_malloc() mallocs a GM zone.

Parameters:
zone  (IN) Pointer to the GM zone.
length 
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void* gm_zone_calloc struct gm_zone   zone,
gm_size_t    count,
gm_size_t    length
 

gm_zone_calloc() callocs a GM zone.

Parameters:
zone  (IN) Pointer to the GM zone.
count 
length 
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT int gm_zone_addr_in_zone struct gm_zone   zone,
void *    p
 

gm_zone_addr_in_zone()

Parameters:
zone  (IN) Pointer to the GM zone.
p 
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

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

Parameters:
p  (IN) The handle to the GM port.
priority  (IN) The priority of the message being sent.
target_node_id  (IN) The GM node to which the message is being sent.
target_port_id  (IN) The GM port on the destination GM node to which the message is being sent.
callback  (IN) The function called when the send is complete.
context  (IN) Pointer to an integer or to a structure that is passed to the callback function.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

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

Parameters:
port  (IN) The handle to the GM port.
priority  (IN) The priority of the message.
target_node_id  (IN) The GM node to which the message is being sent.
target_port_id  (IN) The GM port on the destination GM node to which the message was sent.
callback  (IN) The function called when the send is complete.
context  (IN) Pointer to an integer or to a structure that is passed to the callback function.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT gm_pid_t gm_getpid void   
 

gm_getpid() is a cover for the usual Unix getpid() functionality.

Return values:
gm_pid_t  The process ID of the parent of the current process.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

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_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.

Return values:
GM_SUCCESS  Operation completed successfully.
GM_FAILURE  Error occurred.
Parameters:
p  (IN) Handle to the GM port.
source_addr  (IN) Address of the data to be copied.
target_addr  (IN) Target address of the copied data.
length  (IN) The length (in bytes) of the area to be copied.
source_instance_id  (IN) The id of the interface.
source_port_id  (IN) The port id of the interface.
Author:
Patrick Geoffray
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_perror const char *    message,
gm_status_t    error
 

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.

Parameters:
message  (OUT) Textual description of the GM error.
error  (IN) GM Error code.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT int gm_sleep unsigned int    seconds
 

gm_sleep() emulates the ANSI standard sleep(), sleeping the entire process for seconds seconds.

Return values:
SLEEP 
Parameters:
seconds  (IN) The number of seconds for which the process should sleep.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_exit gm_status_t    status
 

gm_exit() causes the current process to exit with a status appropriate to the GM status code status.

Parameters:
status  (IN) The GM status code, as specified in gm.h.
See also:
gm_init gm_open gm_close gm_finalize gm_abort
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT int gm_printf const char *    format,
...   
 

gm_printf() emulates or invokes the ANSI standard printf() function.

Return values:
0  Operation completed successfully.
Parameters:
format  Specifies how the arguments are converted for output.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT char* gm_strerror gm_status_t    error
 

gm_strerror() is an error function for GM. The error is only valid until next call to this function.

Return values:
char 
Parameters:
error  (IN) GM status code.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT gm_status_t gm_set_enable_nack_down struct gm_port *    port,
int    flag
 

gm_set_enable_nack_down()

Return values:
GM_SUCCESS  Operation completed successfully.
GM_PERMISSION_DENIED 
Parameters:
port  (IN) Handle to the GM port.
flag 
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT gm_status_t gm_max_node_id_in_use struct gm_port *    port,
unsigned int *    n
 

Returns the maximum GM node ID that is in use by the network attached to the port. (Details).

GM_ENTRY_POINT int gm_eprintf const char *    format,
...   
 

gm_eprintf() emulates or invokes the ANSI standard vprintf() function.

Return values:
0  Operation completed successfully.
Parameters:
format  Specifies how the variable-length arguments are converted for output.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void* gm_memset void *    s,
int    c,
gm_size_t    n
 

gm_memset() reimplements the UNIX function memset().

Return values:
void  Returns a pointer to the memory area s.
Parameters:
s  (IN) The memory area.
c  (IN) The constant byte size.
n  (IN) The number of bytes.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT char * gm_strdup const char *    in
 

gm_strdup() reimplements the UNIX function strdup().

Return values:
char  * Returns a pointer to the duplicated string, or NULL if insufficient memory was available.
Parameters:
in  (IN) The string to be duplicated.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT gm_status_t gm_mark struct gm_mark_set   set,
gm_mark_t *    m
 

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.

Return values:
GM_SUCCESS  Operation completed successfully.
Parameters:
set  (IN) Handle to the GM mark set.
m 
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT int gm_mark_is_valid struct gm_mark_set   set,
gm_mark_t *    m
 

gm_mark_is_valid() returns nonzero value if `*MARK' is in SET. Requires O(constant) time.

Return values:
int 
Parameters:
set  (IN) Handle to the GM mark set.
m 
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT gm_status_t gm_create_mark_set struct gm_mark_set **    msp,
unsigned long    cnt
 

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

Return values:
GM_SUCCESS  Operation completed successfully.
Parameters:
msp  (IN) Handle to the GM mark set.
cnt 
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_destroy_mark_set struct gm_mark_set   set
 

gm_destroy_mark_set() frees all resources associated with mark set `*SET'. Requires time comparable to free().

Parameters:
set  (IN) Handle to the GM mark set.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_unmark struct gm_mark_set   set,
gm_mark_t *    m
 

gm_unmark() removes `*MARK' from SET. Requires O(constant) time.

Parameters:
set  (IN) Handle to the GM mark set.
m 
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT void gm_unmark_all struct gm_mark_set   set
 

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.

Parameters:
set  (IN) Handle to the GM mark set.
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

GM_ENTRY_POINT gm_status_t gm_on_exit gm_on_exit_callback_t    callback,
void *    arg
 

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.

Return values:
GM_SUCCESS  Operation completed successfully.
GM_OUT_OF_MEMORY 
Parameters:
callback 
arg 
Author:
Glenn Brown
Version:
GM_API_VERSION (as defined in gm.h)

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
 

RDMA Read Operation (GET) (Details).

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
 

Directed send (PUT) (Details).

GM_ENTRY_POINT gm_status_t gm_global_id_to_node_id struct gm_port *    port,
unsigned int    global_id,
unsigned int *    node_id
 

Stores at *node_id the local connection ID corresponding to the connection to global_id. (gm_global_id_to_node_id "Details").

GM_ENTRY_POINT gm_status_t gm_node_id_to_global_id struct gm_port *    port,
unsigned int    node_id,
unsigned int *    global_id
 

Stores at *global_id the global node ID corresponding to the connection identified by the local connection ID. (Details).

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]
 

Store at *name the host name of the host containing the network interface card with GM node id node_id. (Details).

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
 

Store at *node_id the node ID of the host containing the network interface card with GM host name host_name. (Details).


Variable Documentation

GM_ENTRY_POINT const unsigned char gm_log2_roundup_table[257]
 

Log 2 roundup table. (Details).


Generated on Mon Nov 3 15:39:25 2003 for GM by doxygen1.2.15