Skip to content

Commit

Permalink
Merge pull request #2348 from gebart/pr/fno-common-fixes1
Browse files Browse the repository at this point in the history
Removing (some) common globals, working towards #2346
  • Loading branch information
Joakim Gebart committed Jan 26, 2015
2 parents 229cd70 + 6a810fe commit f71f832
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 26 deletions.
4 changes: 2 additions & 2 deletions examples/default/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@

#ifdef MODULE_TRANSCEIVER

char radio_stack_buffer[RADIO_STACK_SIZE];
msg_t msg_q[RCV_BUFFER_SIZE];
static char radio_stack_buffer[RADIO_STACK_SIZE];
static msg_t msg_q[RCV_BUFFER_SIZE];

void *radio(void *arg)
{
Expand Down
4 changes: 2 additions & 2 deletions examples/rpl_udp/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

extern uint8_t ipv6_ext_hdr_len;

msg_t msg_q[RCV_BUFFER_SIZE];
static msg_t msg_q[RCV_BUFFER_SIZE];

void rpl_udp_set_id(int argc, char **argv)
{
Expand Down Expand Up @@ -121,7 +121,7 @@ void *rpl_udp_monitor(void *arg)
return NULL;
}

transceiver_command_t tcmd;
static transceiver_command_t tcmd;

void rpl_udp_ignore(int argc, char **argv)
{
Expand Down
6 changes: 3 additions & 3 deletions sys/net/network_layer/sixlowpan/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@

#define DEFAULT_IEEE_802154_PAN_ID (0x1234)

char radio_stack_buffer[RADIO_STACK_SIZE];
msg_t msg_q[RADIO_RCV_BUF_SIZE];
static char radio_stack_buffer[RADIO_STACK_SIZE];
static msg_t msg_q[RADIO_RCV_BUF_SIZE];

uint8_t lowpan_mac_buf[PAYLOAD_SIZE];
static uint8_t lowpan_mac_buf[PAYLOAD_SIZE];
static uint8_t macdsn;

static inline void mac_frame_short_to_eui64(net_if_eui64_t *eui64,
Expand Down
21 changes: 8 additions & 13 deletions sys/net/routing/etx_beaconing.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ static void *etx_beacon(void *);
static void *etx_clock(void *);
static void *etx_radio(void *);

//Buffer
/* Buffer */
static char etx_beacon_buf[ETX_BEACON_STACKSIZE];
static char etx_radio_buf[ETX_RADIO_STACKSIZE];
static char etx_clock_buf[ETX_CLOCK_STACKSIZE];

static uint8_t etx_send_buf[ETX_BUF_SIZE];
static uint8_t etx_rec_buf[ETX_BUF_SIZE];

//PIDs
kernel_pid_t etx_beacon_pid = KERNEL_PID_UNDEF;
kernel_pid_t etx_radio_pid = KERNEL_PID_UNDEF;
kernel_pid_t etx_clock_pid = KERNEL_PID_UNDEF;
/* PIDs */
static kernel_pid_t etx_beacon_pid = KERNEL_PID_UNDEF;
static kernel_pid_t etx_radio_pid = KERNEL_PID_UNDEF;
static kernel_pid_t etx_clock_pid = KERNEL_PID_UNDEF;

//Message queue for radio
/* Message queue for radio */
static msg_t msg_que[ETX_RCV_QUEUE_SIZE];

/*
Expand All @@ -93,7 +93,7 @@ static char reached_window;
* which we put all necessary info for up to ETX_MAX_CANDIDATE_NEIHGBORS
* candidates.
*/
//Candidate array
/* Candidate array */
static etx_neighbor_t candidates[ETX_MAX_CANDIDATE_NEIGHBORS];

/*
Expand All @@ -103,12 +103,7 @@ static etx_neighbor_t candidates[ETX_MAX_CANDIDATE_NEIGHBORS];
* In this time, no packet may be handled, otherwise it could assume values
* from the last round to count for this round.
*/
mutex_t etx_mutex = MUTEX_INIT;
//Transceiver command for sending ETX probes
transceiver_command_t tcmd;

//Message to send probes with
msg_t mesg;
static mutex_t etx_mutex = MUTEX_INIT;

static ipv6_addr_t *own_address;

Expand Down
12 changes: 6 additions & 6 deletions tests/nativenet/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
#define RCV_BUFFER_SIZE (64)
#define RADIO_STACK_SIZE (KERNEL_CONF_STACKSIZE_DEFAULT)

char radio_stack_buffer[RADIO_STACK_SIZE];
msg_t msg_q[RCV_BUFFER_SIZE];
uint8_t snd_buffer[NATIVE_MAX_DATA_LENGTH];
uint8_t receiving = 1;
unsigned int last_seq = 0, missed_cnt = 0;
int first = -1;
static char radio_stack_buffer[RADIO_STACK_SIZE];
static msg_t msg_q[RCV_BUFFER_SIZE];
static uint8_t snd_buffer[NATIVE_MAX_DATA_LENGTH];
static uint8_t receiving = 1;
static unsigned int last_seq = 0, missed_cnt = 0;
static int first = -1;

void *radio(void *arg)
{
Expand Down

0 comments on commit f71f832

Please sign in to comment.