Commit 059a0a3f authored by gauthier's avatar gauthier
Browse files

astyle --recursive --indent=spaces=2 --style=kr --indent-col1-comments...

astyle  --recursive --indent=spaces=2 --style=kr  --indent-col1-comments --break-blocks --convert-tabs --max-code-length=200

This is done for better merging branch/LG_PRE_RELEASE_0.3 into trunk (same process is applied on this branch)

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7073 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent f0a8a0b3

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
/*******************************************************************************
OpenAirInterface
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
......@@ -14,15 +14,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
......@@ -30,7 +30,7 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef CMAKER
#include <platform_types.h>
#include <platform_types.h>
#endif
#if defined(ENB_MODE)
......
/*******************************************************************************
OpenAirInterface
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
......@@ -14,15 +14,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
......@@ -41,24 +41,24 @@
/* Obtain a backtrace and print it to stdout. */
void display_backtrace(void)
{
void *array[10];
size_t size;
char **strings;
size_t i;
void *array[10];
size_t size;
char **strings;
size_t i;
size = backtrace(array, 10);
strings = backtrace_symbols(array, size);
size = backtrace(array, 10);
strings = backtrace_symbols(array, size);
printf("Obtained %zd stack frames.\n", size);
printf("Obtained %zd stack frames.\n", size);
for (i = 0; i < size; i++)
printf("%s\n", strings[i]);
for (i = 0; i < size; i++)
printf("%s\n", strings[i]);
free(strings);
free(strings);
}
void backtrace_handle_signal(siginfo_t *info)
{
display_backtrace();
//exit(EXIT_FAILURE);
display_backtrace();
//exit(EXIT_FAILURE);
}
/*******************************************************************************
OpenAirInterface
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
......@@ -14,15 +14,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
......
This diff is collapsed.
/*******************************************************************************
OpenAirInterface
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
......@@ -14,15 +14,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
......@@ -62,41 +62,41 @@ typedef unsigned long message_number_t;
#define MESSAGE_NUMBER_SIZE (sizeof(unsigned long))
typedef enum message_priorities_e {
MESSAGE_PRIORITY_MAX = 100,
MESSAGE_PRIORITY_MAX_LEAST = 85,
MESSAGE_PRIORITY_MED_PLUS = 70,
MESSAGE_PRIORITY_MED = 55,
MESSAGE_PRIORITY_MED_LEAST = 40,
MESSAGE_PRIORITY_MIN_PLUS = 25,
MESSAGE_PRIORITY_MIN = 10,
MESSAGE_PRIORITY_MAX = 100,
MESSAGE_PRIORITY_MAX_LEAST = 85,
MESSAGE_PRIORITY_MED_PLUS = 70,
MESSAGE_PRIORITY_MED = 55,
MESSAGE_PRIORITY_MED_LEAST = 40,
MESSAGE_PRIORITY_MIN_PLUS = 25,
MESSAGE_PRIORITY_MIN = 10,
} message_priorities_t;
typedef struct message_info_s {
task_id_t id;
message_priorities_t priority;
/* Message payload size */
MessageHeaderSize size;
/* Printable name */
const char * const name;
task_id_t id;
message_priorities_t priority;
/* Message payload size */
MessageHeaderSize size;
/* Printable name */
const char * const name;
} message_info_t;
typedef enum task_priorities_e {
TASK_PRIORITY_MAX = 100,
TASK_PRIORITY_MAX_LEAST = 85,
TASK_PRIORITY_MED_PLUS = 70,
TASK_PRIORITY_MED = 55,
TASK_PRIORITY_MED_LEAST = 40,
TASK_PRIORITY_MIN_PLUS = 25,
TASK_PRIORITY_MIN = 10,
TASK_PRIORITY_MAX = 100,
TASK_PRIORITY_MAX_LEAST = 85,
TASK_PRIORITY_MED_PLUS = 70,
TASK_PRIORITY_MED = 55,
TASK_PRIORITY_MED_LEAST = 40,
TASK_PRIORITY_MIN_PLUS = 25,
TASK_PRIORITY_MIN = 10,
} task_priorities_t;
typedef struct task_info_s {
thread_id_t thread;
task_id_t parent_task;
task_priorities_t priority;
unsigned int queue_size;
/* Printable name */
const char * const name;
thread_id_t thread;
task_id_t parent_task;
task_priorities_t priority;
unsigned int queue_size;
/* Printable name */
const char * const name;
} task_info_t;
/** \brief Update the itti LTE time reference for messages
......@@ -205,8 +205,8 @@ const char *itti_get_task_name(task_id_t task_id);
* @returns NULL in case of failure or newly allocated mesage ref
**/
MessageDef *itti_alloc_new_message(
task_id_t origin_task_id,
MessagesIds message_id);
task_id_t origin_task_id,
MessagesIds message_id);
/** \brief Alloc and memset(0) a new itti message.
* \param origin_task_id Task ID of the sending task
......@@ -215,9 +215,9 @@ MessageDef *itti_alloc_new_message(
* @returns NULL in case of failure or newly allocated mesage ref
**/
MessageDef *itti_alloc_new_message_sized(
task_id_t origin_task_id,
MessagesIds message_id,
MessageHeaderSize size);
task_id_t origin_task_id,
MessagesIds message_id,
MessageHeaderSize size);
/** \brief handle signals and wait for all threads to join when the process complete.
* This function should be called from the main thread after having created all ITTI tasks.
......
/*******************************************************************************
OpenAirInterface
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
......@@ -14,15 +14,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
......
/*******************************************************************************
OpenAirInterface
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
......@@ -14,15 +14,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
......@@ -55,7 +55,7 @@ const char * const messages_definition_xml = {
/* Map task id to printable name. */
const task_info_t tasks_info[] = {
{0, TASK_UNKNOWN, 0, 0, "TASK_UNKNOWN"},
{0, TASK_UNKNOWN, 0, 0, "TASK_UNKNOWN"},
#define TASK_DEF(tHREADiD, pRIO, qUEUEsIZE) { tHREADiD##_THREAD, TASK_UNKNOWN, pRIO, qUEUEsIZE, #tHREADiD },
#define SUB_TASK_DEF(tHREADiD, sUBtASKiD, qUEUEsIZE) { sUBtASKiD##_THREAD, tHREADiD##_THREAD, 0, qUEUEsIZE, #sUBtASKiD },
#include <tasks_def.h>
......
/*******************************************************************************
OpenAirInterface
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
......@@ -14,15 +14,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
......@@ -63,19 +63,17 @@
#include <messages_types.h>
/* This enum defines messages ids. Each one is unique. */
typedef enum
{
typedef enum {
#define MESSAGE_DEF(iD, pRIO, sTRUCT, fIELDnAME) iD,
#include <messages_def.h>
#undef MESSAGE_DEF
MESSAGES_ID_MAX,
MESSAGES_ID_MAX,
} MessagesIds;
//! Thread id of each task
typedef enum
{
THREAD_NULL = 0,
typedef enum {
THREAD_NULL = 0,
#define TASK_DEF(tHREADiD, pRIO, qUEUEsIZE) THREAD_##tHREADiD,
#define SUB_TASK_DEF(tHREADiD, sUBtASKiD, qUEUEsIZE)
......@@ -83,13 +81,12 @@ typedef enum
#undef SUB_TASK_DEF
#undef TASK_DEF
THREAD_MAX,
THREAD_FIRST = 1,
THREAD_MAX,
THREAD_FIRST = 1,
} thread_id_t;
//! Sub-tasks id, to defined offset form thread id
typedef enum
{
typedef enum {
#define TASK_DEF(tHREADiD, pRIO, qUEUEsIZE) tHREADiD##_THREAD = THREAD_##tHREADiD,
#define SUB_TASK_DEF(tHREADiD, sUBtASKiD, qUEUEsIZE) sUBtASKiD##_THREAD = THREAD_##tHREADiD,
#include <tasks_def.h>
......@@ -98,9 +95,8 @@ typedef enum
} task_thread_id_t;
//! Tasks id of each task
typedef enum
{
TASK_UNKNOWN = 0,
typedef enum {
TASK_UNKNOWN = 0,
#define TASK_DEF(tHREADiD, pRIO, qUEUEsIZE) tHREADiD,
#define SUB_TASK_DEF(tHREADiD, sUBtASKiD, qUEUEsIZE) sUBtASKiD,
......@@ -108,12 +104,11 @@ typedef enum
#undef SUB_TASK_DEF
#undef TASK_DEF
TASK_MAX,
TASK_FIRST = 1,
TASK_MAX,
TASK_FIRST = 1,
} task_id_t;
typedef union msg_s
{
typedef union msg_s {
#define MESSAGE_DEF(iD, pRIO, sTRUCT, fIELDnAME) sTRUCT fIELDnAME;
#include <messages_def.h>
#undef MESSAGE_DEF
......@@ -121,26 +116,24 @@ typedef union msg_s
typedef uint16_t MessageHeaderSize;
typedef struct itti_lte_time_s
{
uint32_t frame;
uint8_t slot;
typedef struct itti_lte_time_s {
uint32_t frame;
uint8_t slot;
} itti_lte_time_t;
/** @struct MessageHeader
* @brief Message Header structure for inter-task communication.
*/
typedef struct MessageHeader_s
{
MessagesIds messageId; /**< Unique message id as referenced in enum MessagesIds */
typedef struct MessageHeader_s {
MessagesIds messageId; /**< Unique message id as referenced in enum MessagesIds */
task_id_t originTaskId; /**< ID of the sender task */
task_id_t destinationTaskId; /**< ID of the destination task */
instance_t instance; /**< Task instance for virtualization */
task_id_t originTaskId; /**< ID of the sender task */
task_id_t destinationTaskId; /**< ID of the destination task */
instance_t instance; /**< Task instance for virtualization */
MessageHeaderSize ittiMsgSize; /**< Message size (not including header size) */
MessageHeaderSize ittiMsgSize; /**< Message size (not including header size) */
itti_lte_time_t lte_time; /**< Reference LTE time */
itti_lte_time_t lte_time; /**< Reference LTE time */
} MessageHeader;
/** @struct MessageDef
......@@ -148,10 +141,9 @@ typedef struct MessageHeader_s
* \internal
* The attached attribute \c __packed__ is neccessary, because the memory allocation code expects \ref ittiMsg directly following \ref ittiMsgHeader.
*/
typedef struct __attribute__ ((__packed__)) MessageDef_s
{
MessageHeader ittiMsgHeader; /**< Message header */
msg_t ittiMsg; /**< Union of payloads as defined in x_messages_def.h headers */
typedef struct __attribute__ ((__packed__)) MessageDef_s {
MessageHeader ittiMsgHeader; /**< Message header */
msg_t ittiMsg; /**< Union of payloads as defined in x_messages_def.h headers */
} MessageDef;
#endif /* INTERTASK_INTERFACE_TYPES_H_ */
......
/*******************************************************************************
OpenAirInterface
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
......@@ -14,15 +14,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
......
/*******************************************************************************
OpenAirInterface
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
......@@ -14,15 +14,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
......@@ -38,14 +38,12 @@
#ifndef INTERTASK_MESSAGES_TYPES_H_
#define INTERTASK_MESSAGES_TYPES_H_
typedef struct IttiMsgEmpty_s
{
typedef struct IttiMsgEmpty_s {
} IttiMsgEmpty;
typedef struct IttiMsgText_s
{
uint32_t size;
char text[];
typedef struct IttiMsgText_s {
uint32_t size;
char text[];
} IttiMsgText;
#endif /* INTERTASK_MESSAGES_TYPES_H_ */
/*******************************************************************************
OpenAirInterface
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
......@@ -14,15 +14,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
......@@ -42,19 +42,18 @@
#define MESSAGE_NUMBER_CHAR_FORMAT "%11u"
/* Intertask message types */
enum itti_message_types_e
{
ITTI_DUMP_XML_DEFINITION = CHARS_TO_UINT32 ('\n', 'I', 'x', 'd'),
ITTI_DUMP_XML_DEFINITION_END = CHARS_TO_UINT32 ('i', 'X', 'D', '\n'),
enum itti_message_types_e {
ITTI_DUMP_XML_DEFINITION = CHARS_TO_UINT32 ('\n', 'I', 'x', 'd'),
ITTI_DUMP_XML_DEFINITION_END = CHARS_TO_UINT32 ('i', 'X', 'D', '\n'),
ITTI_DUMP_MESSAGE_TYPE = CHARS_TO_UINT32 ('\n', 'I', 'm', 's'),
ITTI_DUMP_MESSAGE_TYPE_END = CHARS_TO_UINT32 ('i', 'M', 'S', '\n'),
ITTI_DUMP_MESSAGE_TYPE = CHARS_TO_UINT32 ('\n', 'I', 'm', 's'),
ITTI_DUMP_MESSAGE_TYPE_END = CHARS_TO_UINT32 ('i', 'M', 'S', '\n'),
ITTI_STATISTIC_MESSAGE_TYPE = CHARS_TO_UINT32 ('\n', 'I', 's', 't'),
ITTI_STATISTIC_MESSAGE_TYPE_END = CHARS_TO_UINT32 ('i', 'S', 'T', '\n'),
ITTI_STATISTIC_MESSAGE_TYPE = CHARS_TO_UINT32 ('\n', 'I', 's', 't'),
ITTI_STATISTIC_MESSAGE_TYPE_END = CHARS_TO_UINT32 ('i', 'S', 'T', '\n'),
/* This signal is not meant to be used by remote analyzer */
ITTI_DUMP_EXIT_SIGNAL = CHARS_TO_UINT32 ('e', 'X', 'I', 'T'),
/* This signal is not meant to be used by remote analyzer */
ITTI_DUMP_EXIT_SIGNAL = CHARS_TO_UINT32 ('e', 'X', 'I', 'T'),
};
typedef uint32_t itti_message_types_t;
......@@ -63,13 +62,13 @@ typedef uint32_t itti_message_types_t;
* remote process and this one.
*/
typedef struct {
/* The size of this structure */
uint32_t message_size;
itti_message_types_t message_type;
/* The size of this structure */
uint32_t message_size;
itti_message_types_t message_type;
} itti_socket_header_t;
typedef struct {
char message_number_char[12]; /* 9 chars are needed to store an unsigned 32 bits value in decimal, but must be a multiple of 32 bits to avoid alignment issues */
char message_number_char[12]; /* 9 chars are needed to store an unsigned 32 bits value in decimal, but must be a multiple of 32 bits to avoid alignment issues */
} itti_signal_header_t;
......
This diff is collapsed.
/*******************************************************************************
OpenAirInterface
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
......@@ -14,15 +14,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
......
/*******************************************************************************
OpenAirInterface
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
......@@ -14,15 +14,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
along with OpenAirInterface.The full GNU General Public License is