set header size on given request, i.e.
set header size on given request, i.e. send at least this size eagerly
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <assert.h>
#include "../common/nm_examples_helper.h"
const char msg[] = "Hello, world!";
int main(int argc, char**argv)
{
{
int*p_len = buf;
printf("SUCCESS- rc = %d; header len = %d\n", rc, *p_len);
printf("buffer contents: %s\n", (char*)(buf + sizeof(int)));
}
else
{
int*p_len = buf;
strcpy(buf + sizeof(int), msg);
puk_sleep(1);
printf("# sender- header len = %d\n", *p_len);
}
free(buf);
return 0;
}
@ NM_ESUCCESS
successful operation
static void nm_data_contiguous_build(struct nm_data_s *p_data, void *ptr, nm_len_t len)
static void nm_examples_init(int *argc, char *argv[])
static nm_session_t p_session
static void nm_examples_exit(void)
static void nm_sr_recv_init(nm_session_t p_session, nm_sr_request_t *p_request)
static int nm_sr_recv_peek(nm_session_t p_session, nm_sr_request_t *p_request, const struct nm_data_s *p_data)
peek for already received (unexpected) data
static int nm_sr_swait(nm_session_t p_session, nm_sr_request_t *p_request)
Wait for the completion of a non blocking send request.
static void nm_sr_recv_data_wait(nm_session_t p_session, nm_sr_request_t *p_request)
waits for first byte of data to be available, for a request posted without data descriptor
static int nm_sr_rwait(nm_session_t p_session, nm_sr_request_t *p_request)
Wait for the completion of a non blocking receive request.
static int nm_sr_recv_post(nm_session_t p_session, nm_sr_request_t *p_request)
posts the receive request to the scheduler
static void nm_sr_recv_match(nm_session_t p_session, nm_sr_request_t *p_request, nm_gate_t p_gate, nm_tag_t tag, nm_tag_t mask)
match the request with given gate/tag/mask
static void nm_sr_recv_unpack_contiguous(nm_session_t p_session, nm_sr_request_t *p_request, void *ptr, nm_len_t len)
static int nm_sr_isend(nm_session_t p_session, nm_gate_t p_gate, nm_tag_t tag, const void *data, nm_len_t len, nm_sr_request_t *p_request)
Post a non blocking send request.
uint64_t nm_len_t
data length used by nmad
#define NM_TAG_MASK_FULL
tag mask that matches all bits
a data descriptor, used to pack/unpack data from app layout to/from contiguous buffers
internal defintion of the sendrecv request