Skip to content

Commit

Permalink
Moved ctimer.[ch] from their old and illogical location in core/net/r…
Browse files Browse the repository at this point in the history
…ime to a more appropriate place in core/sys
  • Loading branch information
adamdunkels committed Jun 14, 2010
1 parent f81ca85 commit 8f8393a
Show file tree
Hide file tree
Showing 19 changed files with 41 additions and 38 deletions.
8 changes: 5 additions & 3 deletions Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ include $(CONTIKI)/core/net/mac/Makefile.mac
SYSTEM = process.c procinit.c autostart.c elfloader.c profile.c \
timetable.c timetable-aggregate.c compower.c serial-line.c
THREADS = mt.c
LIBS = memb.c mmem.c timer.c list.c etimer.c energest.c rtimer.c stimer.c \
LIBS = memb.c mmem.c timer.c list.c etimer.c ctimer.c energest.c rtimer.c stimer.c \
print-stats.c ifft.c crc16.c random.c checkpoint.c ringbuf.c
DEV = nullradio.c
NET = netstack.c uip-debug.c
Expand Down Expand Up @@ -93,10 +93,12 @@ PROJECT_OBJECTFILES = ${addprefix $(OBJECTDIR)/,${call oname, $(PROJECT_SOURCEFI

ifdef APPS
APPDIRS += ${wildcard ${addprefix $(CONTIKI)/apps/, $(APPS)} \
${addprefix $(CONTIKI)/platform/$(TARGET)/apps/, $(APPS)}}
${addprefix $(CONTIKI)/platform/$(TARGET)/apps/, $(APPS)} \
${addprefix , $(APPS)}}
APPINCLUDES = ${foreach APP, $(APPS), ${wildcard \
$(CONTIKI)/apps/$(APP)/Makefile.$(APP) \
$(CONTIKI)/platform/$(TARGET)/apps/$(APP)/Makefile.$(APP)}}
$(CONTIKI)/platform/$(TARGET)/apps/$(APP)/Makefile.$(APP) \
$(APP)/Makefile.$(APP)}}
-include $(APPINCLUDES)
APP_SOURCES = ${foreach APP, $(APPS), $($(APP)_src)}
DSC_SOURCES = ${foreach APP, $(APPS), $($(APP)_dsc)}
Expand Down
3 changes: 2 additions & 1 deletion core/contiki.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* Author: Adam Dunkels <[email protected]>
*
* $Id: contiki.h,v 1.5 2008/07/03 23:36:30 adamdunkels Exp $
* $Id: contiki.h,v 1.6 2010/06/14 07:34:36 adamdunkels Exp $
*/
#ifndef __CONTIKI_H__
#define __CONTIKI_H__
Expand All @@ -42,6 +42,7 @@
#include "sys/autostart.h"

#include "sys/timer.h"
#include "sys/ctimer.h"
#include "sys/etimer.h"
#include "sys/rtimer.h"

Expand Down
5 changes: 3 additions & 2 deletions core/net/mac/csma.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: csma.c,v 1.16 2010/04/08 09:33:37 adamdunkels Exp $
* $Id: csma.c,v 1.17 2010/06/14 07:34:36 adamdunkels Exp $
*/

/**
Expand All @@ -41,7 +41,8 @@
#include "net/mac/csma.h"
#include "net/rime/packetbuf.h"
#include "net/rime/queuebuf.h"
#include "net/rime/ctimer.h"

#include "sys/ctimer.h"

#include "lib/random.h"

Expand Down
6 changes: 3 additions & 3 deletions core/net/mac/phase.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: phase.c,v 1.11 2010/04/27 12:56:35 fros4943 Exp $
* $Id: phase.c,v 1.12 2010/06/14 07:34:37 adamdunkels Exp $
*/

/**
Expand All @@ -42,7 +42,7 @@
#include "net/rime/packetbuf.h"
#include "sys/clock.h"
#include "lib/memb.h"
#include "net/rime/ctimer.h"
#include "sys/ctimer.h"
#include "net/rime/queuebuf.h"
#include "dev/watchdog.h"
#include "dev/leds.h"
Expand All @@ -57,7 +57,7 @@ struct phase_queueitem {
#define PHASE_DEFER_THRESHOLD 1
#define PHASE_QUEUESIZE 8

#define MAX_NOACKS 2
#define MAX_NOACKS 3

MEMB(queued_packets_memb, struct phase_queueitem, PHASE_QUEUESIZE);

Expand Down
3 changes: 1 addition & 2 deletions core/net/rime.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: rime.h,v 1.28 2010/03/19 13:20:40 adamdunkels Exp $
* $Id: rime.h,v 1.29 2010/06/14 07:34:36 adamdunkels Exp $
*/

/**
Expand All @@ -48,7 +48,6 @@

#include "net/rime/announcement.h"
#include "net/rime/collect.h"
#include "net/rime/ctimer.h"
#include "net/rime/ipolite.h"
#include "net/rime/mesh.h"
#include "net/rime/multihop.h"
Expand Down
2 changes: 1 addition & 1 deletion core/net/rime/Makefile.rime
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RIME_CHAMELEON = chameleon.c channel.c chameleon-raw.c chameleon-bitopt.c
RIME_BASE = packetbuf.c queuebuf.c rimeaddr.c ctimer.c rime.c timesynch.c \
RIME_BASE = packetbuf.c queuebuf.c rimeaddr.c rime.c timesynch.c \
rimestats.c announcement.c polite-announcement.c packetqueue.c \
broadcast-announcement.c
RIME_SINGLEHOP = broadcast.c stbroadcast.c unicast.c stunicast.c \
Expand Down
4 changes: 2 additions & 2 deletions core/net/rime/collect-neighbor.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: collect-neighbor.c,v 1.1 2010/03/19 13:17:00 adamdunkels Exp $
* $Id: collect-neighbor.c,v 1.2 2010/06/14 07:34:37 adamdunkels Exp $
*/

/**
Expand All @@ -49,8 +49,8 @@
#include "contiki.h"
#include "lib/memb.h"
#include "lib/list.h"

#include "net/rime/collect-neighbor.h"
#include "net/rime/ctimer.h"
#include "net/rime/collect.h"

#ifdef COLLECT_NEIGHBOR_CONF_MAX_COLLECT_NEIGHBORS
Expand Down
5 changes: 3 additions & 2 deletions core/net/rime/ipolite.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: ipolite.h,v 1.10 2010/01/25 13:54:06 adamdunkels Exp $
* $Id: ipolite.h,v 1.11 2010/06/14 07:34:37 adamdunkels Exp $
*/

/**
Expand All @@ -94,8 +94,9 @@
#ifndef __IPOLITE_H__
#define __IPOLITE_H__

#include "sys/ctimer.h"

#include "net/rime/broadcast.h"
#include "net/rime/ctimer.h"
#include "net/rime/queuebuf.h"

struct ipolite_conn;
Expand Down
3 changes: 1 addition & 2 deletions core/net/rime/neighbor-discovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: neighbor-discovery.h,v 1.10 2010/02/23 18:36:50 adamdunkels Exp $
* $Id: neighbor-discovery.h,v 1.11 2010/06/14 07:34:37 adamdunkels Exp $
*/

/**
Expand All @@ -61,7 +61,6 @@
#define __NEIGHBOR_DISCOVERY_H__

#include "net/rime/broadcast.h"
#include "net/rime/ctimer.h"

struct neighbor_discovery_conn;

Expand Down
4 changes: 1 addition & 3 deletions core/net/rime/netflood.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: netflood.h,v 1.5 2009/11/08 19:40:17 adamdunkels Exp $
* $Id: netflood.h,v 1.6 2010/06/14 07:34:37 adamdunkels Exp $
*/

/**
Expand All @@ -75,8 +75,6 @@
#ifndef __NETFLOOD_H__
#define __NETFLOOD_H__


#include "net/rime/ctimer.h"
#include "net/rime/queuebuf.h"
#include "net/rime/ipolite.h"

Expand Down
4 changes: 2 additions & 2 deletions core/net/rime/packetqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: packetqueue.c,v 1.2 2010/02/28 09:20:32 adamdunkels Exp $
* $Id: packetqueue.c,v 1.3 2010/06/14 07:34:37 adamdunkels Exp $
*/

/**
Expand All @@ -42,7 +42,7 @@
* Adam Dunkels <[email protected]>
*/

#include "net/rime/ctimer.h"
#include "sys/ctimer.h"
#include "net/rime/packetqueue.h"

/*---------------------------------------------------------------------------*/
Expand Down
4 changes: 3 additions & 1 deletion core/net/rime/packetqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: packetqueue.h,v 1.4 2010/02/28 09:20:32 adamdunkels Exp $
* $Id: packetqueue.h,v 1.5 2010/06/14 07:34:37 adamdunkels Exp $
*/

/**
Expand All @@ -57,6 +57,8 @@
#include "lib/list.h"
#include "lib/memb.h"

#include "sys/ctimer.h"

#include "net/rime/packetbuf.h"
#include "net/rime/queuebuf.h"

Expand Down
3 changes: 1 addition & 2 deletions core/net/rime/polite.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: polite.h,v 1.7 2009/03/12 21:58:21 adamdunkels Exp $
* $Id: polite.h,v 1.8 2010/06/14 07:34:37 adamdunkels Exp $
*/

/**
Expand All @@ -96,7 +96,6 @@

#include "net/rime/abc.h"
#include "net/rime/queuebuf.h"
#include "net/rime/ctimer.h"

struct polite_conn;

Expand Down
4 changes: 2 additions & 2 deletions core/net/rime/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: route.c,v 1.16 2010/02/03 01:18:24 adamdunkels Exp $
* $Id: route.c,v 1.17 2010/06/14 07:34:37 adamdunkels Exp $
*/

/**
Expand All @@ -47,7 +47,7 @@

#include "lib/list.h"
#include "lib/memb.h"
#include "net/rime/ctimer.h"
#include "sys/ctimer.h"
#include "net/rime/route.h"
#include "contiki-conf.h"

Expand Down
5 changes: 3 additions & 2 deletions core/net/rime/stbroadcast.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: stbroadcast.h,v 1.2 2009/05/26 13:58:53 nvt-se Exp $
* $Id: stbroadcast.h,v 1.3 2010/06/14 07:34:37 adamdunkels Exp $
*/

/**
Expand All @@ -61,8 +61,9 @@
#ifndef __STBROADCAST_H__
#define __STBROADCAST_H__

#include "sys/ctimer.h"

#include "net/rime/broadcast.h"
#include "net/rime/ctimer.h"
#include "net/rime/queuebuf.h"

struct stbroadcast_conn;
Expand Down
4 changes: 2 additions & 2 deletions core/net/rime/stunicast.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: stunicast.h,v 1.5 2010/02/23 18:38:05 adamdunkels Exp $
* $Id: stunicast.h,v 1.6 2010/06/14 07:34:37 adamdunkels Exp $
*/

/**
Expand All @@ -73,8 +73,8 @@
#ifndef __STUNICAST_H__
#define __STUNICAST_H__

#include "sys/ctimer.h"
#include "net/rime/unicast.h"
#include "net/rime/ctimer.h"
#include "net/rime/queuebuf.h"

struct stunicast_conn;
Expand Down
5 changes: 3 additions & 2 deletions core/net/rime/trickle.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: trickle.h,v 1.11 2009/04/06 21:20:35 adamdunkels Exp $
* $Id: trickle.h,v 1.12 2010/06/14 07:34:37 adamdunkels Exp $
*/

/**
Expand All @@ -58,8 +58,9 @@
#ifndef __TRICKLE_H__
#define __TRICKLE_H__

#include "sys/ctimer.h"

#include "net/rime/broadcast.h"
#include "net/rime/ctimer.h"
#include "net/rime/queuebuf.h"

#define TRICKLE_ATTRIBUTES { PACKETBUF_ATTR_EPACKET_ID, PACKETBUF_ATTR_BIT * 8 },\
Expand Down
5 changes: 2 additions & 3 deletions core/net/rime/ctimer.c → core/sys/ctimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: ctimer.c,v 1.8 2010/04/09 16:21:07 nvt-se Exp $
* $Id: ctimer.c,v 1.1 2010/06/14 07:34:36 adamdunkels Exp $
*/

/**
Expand All @@ -43,10 +43,9 @@
* Adam Dunkels <[email protected]>
*/

#include "net/rime/ctimer.h"
#include "sys/ctimer.h"
#include "contiki.h"
#include "lib/list.h"
#include "net/rime.h"

LIST(ctimer_list);

Expand Down
2 changes: 1 addition & 1 deletion core/net/rime/ctimer.h → core/sys/ctimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: ctimer.h,v 1.4 2009/11/19 18:32:05 nifi Exp $
* $Id: ctimer.h,v 1.1 2010/06/14 07:34:36 adamdunkels Exp $
*/

/**
Expand Down

0 comments on commit 8f8393a

Please sign in to comment.