Avoid usage of POSIX function names even for static functions as some indirectly included system header might declare them.

This commit is contained in:
oliverschmidt 2007-12-23 14:56:54 +00:00
parent f67506ba2a
commit a9ebc469b8
3 changed files with 23 additions and 23 deletions

View file

@ -28,7 +28,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: nullmac.c,v 1.5 2007/12/16 14:31:43 adamdunkels Exp $ * $Id: nullmac.c,v 1.6 2007/12/23 14:56:54 oliverschmidt Exp $
*/ */
/** /**
@ -45,13 +45,13 @@ static const struct radio_driver *radio;
static void (* receiver_callback)(const struct mac_driver *); static void (* receiver_callback)(const struct mac_driver *);
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static int static int
send(void) send_packet(void)
{ {
return radio->send(rimebuf_hdrptr(), rimebuf_totlen()); return radio->send(rimebuf_hdrptr(), rimebuf_totlen());
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static void static void
input(const struct radio_driver *d) input_packet(const struct radio_driver *d)
{ {
if(receiver_callback) { if(receiver_callback) {
receiver_callback(&nullmac_driver); receiver_callback(&nullmac_driver);
@ -59,7 +59,7 @@ input(const struct radio_driver *d)
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static int static int
read(void) read_packet(void)
{ {
int len; int len;
rimebuf_clear(); rimebuf_clear();
@ -87,8 +87,8 @@ off(void)
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
const struct mac_driver nullmac_driver = { const struct mac_driver nullmac_driver = {
send, send_packet,
read, read_packet,
set_receive_function, set_receive_function,
on, on,
off, off,
@ -98,7 +98,7 @@ const struct mac_driver *
nullmac_init(const struct radio_driver *d) nullmac_init(const struct radio_driver *d)
{ {
radio = d; radio = d;
radio->set_receive_function(input); radio->set_receive_function(input_packet);
radio->on(); radio->on();
return &nullmac_driver; return &nullmac_driver;
} }

View file

@ -28,7 +28,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: xmac.c,v 1.11 2007/12/05 13:23:17 adamdunkels Exp $ * $Id: xmac.c,v 1.12 2007/12/23 14:56:54 oliverschmidt Exp $
*/ */
/** /**
@ -225,7 +225,7 @@ powercycle(struct rtimer *t, void *ptr)
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static int static int
send(void) send_packet(void)
{ {
rtimer_clock_t t0; rtimer_clock_t t0;
rtimer_clock_t t; rtimer_clock_t t;
@ -361,7 +361,7 @@ send(void)
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static struct queuebuf *queued_packet; static struct queuebuf *queued_packet;
static int static int
qsend(void) qsend_packet(void)
{ {
if(someone_is_sending) { if(someone_is_sending) {
PRINTF("xmac: should queue packet, now just dropping %d %d %d %d.\n", PRINTF("xmac: should queue packet, now just dropping %d %d %d %d.\n",
@ -380,13 +380,13 @@ qsend(void)
} }
} else { } else {
PRINTF("xmac: send immediately.\n"); PRINTF("xmac: send immediately.\n");
return send(); return send_packet();
} }
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static void static void
input(const struct radio_driver *d) input_packet(const struct radio_driver *d)
{ {
if(receiver_callback) { if(receiver_callback) {
receiver_callback(&xmac_driver); receiver_callback(&xmac_driver);
@ -394,7 +394,7 @@ input(const struct radio_driver *d)
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static int static int
read(void) read_packet(void)
{ {
struct xmac_hdr *hdr; struct xmac_hdr *hdr;
u8_t len; u8_t len;
@ -483,7 +483,7 @@ xmac_init(const struct radio_driver *d)
xmac_is_on = 1; xmac_is_on = 1;
radio = d; radio = d;
radio->set_receive_function(input); radio->set_receive_function(input_packet);
BB_SET("xmac.state_addr", (int) &should_be_awake); BB_SET("xmac.state_addr", (int) &should_be_awake);
BB_SET(XMAC_RECEIVER, 0); BB_SET(XMAC_RECEIVER, 0);
@ -509,8 +509,8 @@ off(void)
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
const struct mac_driver xmac_driver = const struct mac_driver xmac_driver =
{ {
qsend, qsend_packet,
read, read_packet,
set_receive_function, set_receive_function,
on, on,
off off

View file

@ -34,7 +34,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: timesynch.c,v 1.3 2007/12/20 20:30:55 oliverschmidt Exp $ * $Id: timesynch.c,v 1.4 2007/12/23 14:57:11 oliverschmidt Exp $
*/ */
/** /**
@ -89,7 +89,7 @@ timesynch_offset(void)
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static int static int
send(void) send_packet(void)
{ {
return mac->send(); return mac->send();
} }
@ -101,7 +101,7 @@ adjust_offset(rtimer_clock_t authoritative_time, rtimer_clock_t local_time)
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static int static int
read(void) read_packet(void)
{ {
int len; int len;
@ -145,15 +145,15 @@ off(void)
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static const struct mac_driver timesynch_driver = { static const struct mac_driver timesynch_driver = {
send, send_packet,
read, read_packet,
set_receive_function, set_receive_function,
on, on,
off, off,
}; };
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static void static void
input(const struct mac_driver *d) input_packet(const struct mac_driver *d)
{ {
if(receiver_callback) { if(receiver_callback) {
receiver_callback(&timesynch_driver); receiver_callback(&timesynch_driver);
@ -164,7 +164,7 @@ const struct mac_driver *
timesynch_init(const struct mac_driver *d) timesynch_init(const struct mac_driver *d)
{ {
mac = d; mac = d;
mac->set_receive_function(input); mac->set_receive_function(input_packet);
mac->on(); mac->on();
return &timesynch_driver; return &timesynch_driver;
} }