rt_benchs/communication_techniques/src/communication/fake.c

80 lines
1.3 KiB
C

#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
/* Non standard include */
#include <commtech.h>
#include <specific_comm.h>
__thread void ** volatile store_var = NULL;
int init_library(void)
{
return 0;
}
int finalize_library(void)
{
return 0;
}
void *create_comm_channel(void)
{
return (void *) &store_var;
}
int destroy_comm_channel(void *unused)
{
return 0;
}
int init_producer_thread(void *unused)
{
return 0;
}
int finalize_producer_thread(void *unused)
{
return 0;
}
int init_consumer_thread(void *unused)
{
return 0;
}
int finalize_consumer_thread(void *unused)
{
return 0;
}
/*
* Copy at max count received data into buf
* @param buf The buffer in which received data must be copied into
* @return Number of data received and copied into buf
*
* @warning recv_one_data should not be used in conjonction of
* recv_some_data
*/
void *recv_one_data(void)
{
return NULL;
}
/*
* Copy at max count received data into buf
* @param buf The buffer in which received data must be copied into
* @return Number of data received and copied into buf
*
* @warning recv_some_data should not be used in conjonction of
* recv_one_data
* @warning count must be a multiple of BUF_SIZE
*/
ssize_t recv_some_data(void **buf, size_t count)
{
return count;
}