Fix #582, RTAI, RTAI_ENABLED, ENABLE_RTAI_CLOCK, RTAI_ISNT_POSIX, _RTAI_MATH_H, CELLULAR, TIMER_ONESHOT_MODE, EMOS, EMOS_CHANNEL, OAI_EMU, OPENAIR_EMU, PHY_ABSTRACTION, PHY_ABSTRACTION_UL removed

This commit is contained in:
bruno mongazon
2018-01-15 18:47:07 +01:00
parent afcc9aabd8
commit cf0e9175dd
150 changed files with 45 additions and 23495 deletions
-89
View File
@@ -44,13 +44,6 @@
# include <pthread.h>
# include <string.h>
#ifdef RTAI
# include <rtai.h>
# include <rtai_fifos.h>
# define FIFO_PRINTF_MAX_STRING_SIZE 1000
# define FIFO_PRINTF_NO 62
# define FIFO_PRINTF_SIZE 65536
#endif
#include "common/config/config_userapi.h"
// main log variables
log_t *g_log;
@@ -90,9 +83,7 @@ int log_list_head = 0;
int log_shutdown;
#endif
#ifndef RTAI
static int gfd;
#endif
static char *log_level_highlight_start[] = {LOG_RED, LOG_RED, LOG_RED, LOG_RED, LOG_ORANGE, LOG_BLUE, "", ""}; /*!< \brief Optional start-format strings for highlighting */
static char *log_level_highlight_end[] = {LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET,LOG_RESET, "",""}; /*!< \brief Optional end-format strings for highlighting */
@@ -162,9 +153,7 @@ void log_getconfig(log_t *g_log) {
int logInit (void)
{
#ifndef RTAI
int i;
#endif
g_log = calloc(1, sizeof(log_t));
if (g_log == NULL) {
@@ -473,7 +462,6 @@ int logInit (void)
g_log->level = LOG_TRACE;
g_log->flag = LOG_LOW;
#ifndef RTAI
g_log->config.remote_ip = 0;
g_log->config.remote_level = LOG_EMERG;
g_log->config.facility = LOG_LOCAL7;
@@ -501,12 +489,6 @@ int logInit (void)
}
}
#else
g_log->syslog = 0;
g_log->filelog = 0;
rtf_create (FIFO_PRINTF_NO, FIFO_PRINTF_SIZE);
#endif
printf("log init done\n");
return 0;
@@ -634,23 +616,9 @@ void logRecord_thread_safe(const char *file, const char *func,
// OAI printf compatibility
if ((g_log->onlinelog == 1) && (level != LOG_FILE)) {
#ifdef RTAI
if (len > MAX_LOG_TOTAL) {
rt_printk ("[OPENAIR] FIFO_PRINTF WROTE OUTSIDE ITS MEMORY BOUNDARY : ERRORS WILL OCCUR\n");
}
if (len > 0) {
rtf_put (FIFO_PRINTF_NO, log_buffer, len);
}
#else
fprintf(stdout, "%s", log_buffer);
#endif
}
#ifndef RTAI
if (g_log->syslog) {
syslog(g_log->level, "%s", log_buffer);
}
@@ -667,8 +635,6 @@ void logRecord_thread_safe(const char *file, const char *func,
}
}
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LOG_RECORD,
VCD_FUNCTION_OUT);
}
@@ -818,20 +784,7 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
// OAI printf compatibility
if ((g_log->onlinelog == 1) && (level != LOG_FILE))
#ifdef RTAI
if (len > MAX_LOG_TOTAL) {
rt_printk ("[OPENAIR] FIFO_PRINTF WROTE OUTSIDE ITS MEMORY BOUNDARY : ERRORS WILL OCCUR\n");
}
if (len > 0) {
rtf_put (FIFO_PRINTF_NO, c->log_buffer, len);
}
#else
fwrite(c->log_buffer, len, 1, stdout);
#endif
#ifndef RTAI
if (g_log->syslog) {
syslog(g_log->level, "%s", c->log_buffer);
@@ -849,15 +802,6 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
}
}
#else
// online print messges
if ((g_log->log_component[comp].filelog) && (level == LOG_FILE)) {
printf(c->log_buffer);
}
#endif
#if defined(ENABLE_ITTI)
if (level <= LOG_DEBUG) {
@@ -1116,20 +1060,7 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
// OAI printf compatibility
if ((g_log->onlinelog == 1) && (level != LOG_FILE))
#ifdef RTAI
if (len > MAX_LOG_TOTAL) {
rt_printk ("[OPENAIR] FIFO_PRINTF WROTE OUTSIDE ITS MEMORY BOUNDARY : ERRORS WILL OCCUR\n");
}
if (len > 0) {
rtf_put (FIFO_PRINTF_NO, log_buffer, len);
}
#else
fwrite(log_buffer, len, 1, stdout);
#endif
#ifndef RTAI
if (g_log->syslog) {
syslog(g_log->level, "%s", log_buffer);
@@ -1147,15 +1078,6 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
}
}
#else
// online print messges
if ((g_log->log_component[comp].filelog) && (level == LOG_FILE)) {
printf(log_buffer);
}
#endif
#if defined(ENABLE_ITTI)
if (level <= LOG_DEBUG) {
@@ -1382,16 +1304,11 @@ void set_component_filelog(int comp)
{
if (g_log->log_component[comp].filelog == 0) {
g_log->log_component[comp].filelog = 1;
#ifndef RTAI
if (g_log->log_component[comp].fd == 0) {
g_log->log_component[comp].fd = open(g_log->log_component[comp].filelog_name,
O_WRONLY | O_CREAT | O_TRUNC, 0666);
}
#else
#endif
}
}
@@ -1447,9 +1364,6 @@ int is_newline( char *str, int size)
void logClean (void)
{
#ifdef RTAI
rtf_destroy (FIFO_PRINTF_NO);
#else
int i;
if (g_log->syslog) {
@@ -1465,9 +1379,6 @@ void logClean (void)
close(g_log->log_component[i].fd);
}
}
#endif
}
#if defined(ENABLE_ITTI)
-13
View File
@@ -48,10 +48,6 @@
#include "vcd_signal_dumper.h"
#if defined(ENABLE_RTAI_CLOCK)
#include "rtai_lxrt.h"
#endif
#define VCDSIGNALDUMPER_VERSION_MAJOR 0
#define VCDSIGNALDUMPER_VERSION_MINOR 1
@@ -412,8 +408,6 @@ static inline unsigned long long int vcd_get_time(void);
#if defined(ENABLE_USE_CPU_EXECUTION_TIME)
struct timespec g_time_start;
#elif defined(ENABLE_RTAI_CLOCK)
RTIME start;
#endif
@@ -609,8 +603,6 @@ void vcd_signal_dumper_init(char *filename)
#if defined(ENABLE_USE_CPU_EXECUTION_TIME)
clock_gettime(CLOCK_MONOTONIC, &g_time_start);
#elif defined(ENABLE_RTAI_CLOCK)
start=rt_get_time_ns();
#endif
vcd_signal_dumper_create_header();
@@ -663,9 +655,6 @@ static inline void vcd_signal_dumper_print_time_since_start(void)
secondsSinceStart = (long long unsigned int)time.tv_sec - (long long unsigned int)g_time_start.tv_sec;
/* Write time in nanoseconds */
fprintf(vcd_fd, "#%llu\n", nanosecondsSinceStart + (secondsSinceStart * 1000000000UL));
#elif defined(ENABLE_RTAI_CLOCK)
/* Write time in nanoseconds */
fprintf(vcd_fd, "#%llu\n",rt_get_time_ns()-start);
#endif
}
}
@@ -679,8 +668,6 @@ static inline unsigned long long int vcd_get_time(void)
return (long long unsigned int)((time.tv_nsec - g_time_start.tv_nsec)) +
((long long unsigned int)time.tv_sec - (long long unsigned int)g_time_start.tv_sec) * 1000000000UL;
#elif defined(ENABLE_RTAI_CLOCK)
return rt_get_time_ns() - start;
#endif
}
-9
View File
@@ -29,21 +29,12 @@
* @ingroup util
*/
#ifndef RTAI_ENABLED
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include "oml.h"
#else
#include <asm/io.h>
#include <asm/rtai.h>
#include <rtai.h>
#include <rtai_sched.h>
#define time(x) (unsigned int)(rt_get_time_ns())
#endif
unsigned int s0[MAX_NUM_COMPS], s1[MAX_NUM_COMPS], s2[MAX_NUM_COMPS], b[MAX_NUM_COMPS], r[MAX_NUM_COMPS];
-2
View File
@@ -22,8 +22,6 @@ ifdef PDCP_USE_NETLINK
CFLAGS += -DPDCP_USE_NETLINK -DLINUX -DDEBUG_CONTROL
endif
CFLAGS += -DPHY_ABSTRACTION
#ifdef OCG
CFLAGS += -I/usr/include/libxml2 -lxml2
#endif
-2
View File
@@ -75,8 +75,6 @@ ifdef PDCP_USE_NETLINK
CFLAGS += -DPDCP_USE_NETLINK -DLINUX -DDEBUG_CONTROL
endif
CFLAGS += -DPHY_ABSTRACTION
include $(OPENAIR1_DIR)/PHY/Makefile.inc
include $(OPENAIR1_DIR)/SCHED/Makefile.inc
include $(OPENAIR2_DIR)/LAYER2/Makefile.inc
-2
View File
@@ -77,8 +77,6 @@ ifdef PDCP_USE_NETLINK
CFLAGS += -DPDCP_USE_NETLINK -DLINUX -DDEBUG_CONTROL
endif
CFLAGS += -DPHY_ABSTRACTION
include $(OPENAIR1_DIR)/PHY/Makefile.inc
include $(OPENAIR1_DIR)/SCHED/Makefile.inc
include $(OPENAIR2_DIR)/LAYER2/Makefile.inc
-10
View File
@@ -410,18 +410,8 @@ static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context,
/* PCAP Header */
/* TODO: Timestamp might want to be relative to a more sensible
base time... */
#if defined(RTAI)
{
unsigned long long int current_ns;
current_ns = rt_get_time_ns();
packet_header.ts_sec = current_ns / 1000000000UL;
packet_header.ts_usec = current_ns % 1000;
}
#else
packet_header.ts_sec = context->subframesSinceCaptureStart / 1000;
packet_header.ts_usec = (context->subframesSinceCaptureStart % 1000) * 1000;
#endif
packet_header.incl_len = offset + length;
packet_header.orig_len = offset + length;