2009-06-17 15:47:12 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <pthread.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
/* Non standard include */
|
2009-06-18 14:48:07 +02:00
|
|
|
#include <commtech.h>
|
2009-06-17 15:47:12 +02:00
|
|
|
#include <specific_comm.h>
|
|
|
|
|
|
|
|
|
2009-06-24 23:35:58 +02:00
|
|
|
__thread void ** volatile store_var = NULL;
|
|
|
|
|
|
|
|
|
2010-09-22 18:15:57 +02:00
|
|
|
int init_library(void)
|
2009-06-17 15:47:12 +02:00
|
|
|
{
|
2009-06-24 22:25:28 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2010-09-22 18:15:57 +02:00
|
|
|
int finalize_library(void)
|
2009-06-24 22:25:28 +02:00
|
|
|
{
|
|
|
|
return 0;
|
2009-06-17 15:47:12 +02:00
|
|
|
}
|
|
|
|
|
2010-09-22 18:15:57 +02:00
|
|
|
void *create_comm_channel(void)
|
2009-06-17 15:47:12 +02:00
|
|
|
{
|
2010-09-22 18:15:57 +02:00
|
|
|
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;
|
2009-06-17 15:47:12 +02:00
|
|
|
}
|