From a9ebc469b869f6fcf08630720e2a9b0eb7e7ab56 Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Sun, 23 Dec 2007 14:56:54 +0000 Subject: [PATCH] Avoid usage of POSIX function names even for static functions as some indirectly included system header might declare them. --- core/net/mac/nullmac.c | 14 +++++++------- core/net/mac/xmac.c | 18 +++++++++--------- core/sys/timesynch.c | 14 +++++++------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/core/net/mac/nullmac.c b/core/net/mac/nullmac.c index 9d3a98d91..f2ea792e3 100644 --- a/core/net/mac/nullmac.c +++ b/core/net/mac/nullmac.c @@ -28,7 +28,7 @@ * * 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 int -send(void) +send_packet(void) { return radio->send(rimebuf_hdrptr(), rimebuf_totlen()); } /*---------------------------------------------------------------------------*/ static void -input(const struct radio_driver *d) +input_packet(const struct radio_driver *d) { if(receiver_callback) { receiver_callback(&nullmac_driver); @@ -59,7 +59,7 @@ input(const struct radio_driver *d) } /*---------------------------------------------------------------------------*/ static int -read(void) +read_packet(void) { int len; rimebuf_clear(); @@ -87,8 +87,8 @@ off(void) } /*---------------------------------------------------------------------------*/ const struct mac_driver nullmac_driver = { - send, - read, + send_packet, + read_packet, set_receive_function, on, off, @@ -98,7 +98,7 @@ const struct mac_driver * nullmac_init(const struct radio_driver *d) { radio = d; - radio->set_receive_function(input); + radio->set_receive_function(input_packet); radio->on(); return &nullmac_driver; } diff --git a/core/net/mac/xmac.c b/core/net/mac/xmac.c index 2845c4c94..a9f8e3e78 100644 --- a/core/net/mac/xmac.c +++ b/core/net/mac/xmac.c @@ -28,7 +28,7 @@ * * 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 -send(void) +send_packet(void) { rtimer_clock_t t0; rtimer_clock_t t; @@ -361,7 +361,7 @@ send(void) /*---------------------------------------------------------------------------*/ static struct queuebuf *queued_packet; static int -qsend(void) +qsend_packet(void) { if(someone_is_sending) { PRINTF("xmac: should queue packet, now just dropping %d %d %d %d.\n", @@ -380,13 +380,13 @@ qsend(void) } } else { PRINTF("xmac: send immediately.\n"); - return send(); + return send_packet(); } } /*---------------------------------------------------------------------------*/ static void -input(const struct radio_driver *d) +input_packet(const struct radio_driver *d) { if(receiver_callback) { receiver_callback(&xmac_driver); @@ -394,7 +394,7 @@ input(const struct radio_driver *d) } /*---------------------------------------------------------------------------*/ static int -read(void) +read_packet(void) { struct xmac_hdr *hdr; u8_t len; @@ -483,7 +483,7 @@ xmac_init(const struct radio_driver *d) xmac_is_on = 1; 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_RECEIVER, 0); @@ -509,8 +509,8 @@ off(void) /*---------------------------------------------------------------------------*/ const struct mac_driver xmac_driver = { - qsend, - read, + qsend_packet, + read_packet, set_receive_function, on, off diff --git a/core/sys/timesynch.c b/core/sys/timesynch.c index ed688ba9e..ecf8c33db 100644 --- a/core/sys/timesynch.c +++ b/core/sys/timesynch.c @@ -34,7 +34,7 @@ * * 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 -send(void) +send_packet(void) { return mac->send(); } @@ -101,7 +101,7 @@ adjust_offset(rtimer_clock_t authoritative_time, rtimer_clock_t local_time) } /*---------------------------------------------------------------------------*/ static int -read(void) +read_packet(void) { int len; @@ -145,15 +145,15 @@ off(void) } /*---------------------------------------------------------------------------*/ static const struct mac_driver timesynch_driver = { - send, - read, + send_packet, + read_packet, set_receive_function, on, off, }; /*---------------------------------------------------------------------------*/ static void -input(const struct mac_driver *d) +input_packet(const struct mac_driver *d) { if(receiver_callback) { receiver_callback(×ynch_driver); @@ -164,7 +164,7 @@ const struct mac_driver * timesynch_init(const struct mac_driver *d) { mac = d; - mac->set_receive_function(input); + mac->set_receive_function(input_packet); mac->on(); return ×ynch_driver; }