Commit graph

145 commits

Author SHA1 Message Date
adamdunkels 50e1452564 Ugly workaround for internal error in mspgcc when applying the >= operator to two 32-bit values 2010-02-23 18:40:08 +00:00
adamdunkels 0c4c88ae66 Improved per-packet power profiling: if a packet is retransmitted, the new energy is added to the old energy so that it is possible to measure the full energy for all transmissions of the packet 2010-02-23 18:39:00 +00:00
adamdunkels e21c1a39d3 Removed unused code; a number of fixed by Anthony Asterisk 2010-02-02 21:13:27 +00:00
adamdunkels 6f72ff7af1 Remove compiler warnings 2010-01-19 13:08:24 +00:00
adamdunkels eff2203310 There were many bugs in the rtimer code, particularly one that made only one rtimer at a time work. We have a new rtimer system that we're testing, but in the meantime, I rewrote the rtimer code to explicitly support only one rtimer. Makes the code significantly simpler (and fixes a bug that was very hard to track down). 2009-12-08 23:55:17 +00:00
adamdunkels a25a3a45b5 Bugfix: attribute energy expenditure to a device only if the device was actually switched on 2009-10-20 20:19:27 +00:00
adamdunkels 49e9b0bdcb Fixed compiler warning 2009-09-09 21:10:35 +00:00
nvt-se a21dece53f removed unused state codes and unused printf statements 2009-09-03 12:57:57 +00:00
nvt-se 74e9bc8789 Added flash reads and writes to energest. 2009-05-11 15:26:24 +00:00
adamdunkels 65eb5fd4e8 Renamed the rimebuf module to packetbuf to signal that the module is used outside of a pure Rime context (e.g., the sicslowpan code uses it). 2009-03-12 21:58:20 +00:00
adamdunkels 9816f49fe6 Changed listen and transmit energy attributes so that they are named _TIME rather than _ENERGY, to indicate that they contain the time during which the radio was switched on and not the energy 2009-03-02 22:00:41 +00:00
adamdunkels 94c2c0ce85 Communication power accounting: this module keeps track of the energy expenditure of individial communication activities, such as transmission or reception of individual packets or idle listening. 2009-03-01 20:32:03 +00:00
adamdunkels e78fd82f7d Documentation bugfix: rtimer should be in sys group and the stimer library should have the correct documetation group 2009-03-01 09:31:43 +00:00
adamdunkels bdc488c7f3 Removed PROCESS_ZOMBIE code, which does not compile with sdcc, added some optional debugging printouts 2009-02-20 21:24:17 +00:00
adamdunkels e346d8cf95 Reverted the timer_expired() back to the previous version (which should be correct). Removed the definition of CLOCK_LT() because it seems to only cause problems. 2009-01-24 15:20:11 +00:00
adamdunkels 3a4a961ff5 Fixed the CLOCK_LT again. The previous revert was incorrect: the conditional was missing due to a bad copy-and-paste on my part :( 2009-01-24 10:54:44 +00:00
adamdunkels 6cbe50d9ef Fixed missing parenthesis 2009-01-23 17:16:38 +00:00
adamdunkels b258a99e22 Reverted CLOCK_LT to the previous version, which upon closer examination seems to be correct. The new version did not work correctly on the minimal-net platform. 2009-01-23 16:13:57 +00:00
nvt-se da7877e8ab corrected macro name 2008-11-05 19:34:36 +00:00
nvt-se b693690fbe added parameter descriptions 2008-10-14 13:27:55 +00:00
nvt-se 775b8b4ae5 fixed documentation typos. 2008-10-14 12:46:39 +00:00
nvt-se ebeb0b1452 use unsigned long since clock_seconds() returns that. 2008-10-02 15:04:37 +00:00
nvt-se 87a136d33a a timer of seconds 2008-10-02 10:17:48 +00:00
joxe 193bbc9ffa fixed energest to always add positive values and to use all bits, removed energest arch 2008-09-29 11:44:37 +00:00
adamdunkels f127b3e24c Added a timer_remaining() function that returns the time until the timer expires 2008-09-21 08:58:05 +00:00
adamdunkels 9324dc1e7d Hardy Griech's timer bugfix: avoid direct comparison for timer values since they may wrap. Instead, use the CLOCK_LT() that works correctly even for wrapped timers. 2008-08-15 19:16:09 +00:00
adamdunkels 4875d5926d Added CCIF to make clock_seconds() function name visible for win32 2008-07-10 17:09:32 +00:00
adamdunkels 8835868590 Moved to core/net/rime long ago... 2008-07-09 22:14:34 +00:00
adamdunkels e04e49999d Added a clock_seconds() function prototype to core/sys/clock.h, that returns seconds in 32 bit format. 2008-07-07 23:38:46 +00:00
adamdunkels 1f005b6299 Moved energest.{c,h} from core/lib to core/sys: power profiling is a system mechanism, not a library 2008-07-03 23:36:30 +00:00
adamdunkels 3847448496 Added configuration option to circumvent C compilers that have problems with const function pointers (i.e., sdcc) 2008-07-02 08:35:29 +00:00
adamdunkels 41f2443c02 Removed old unused documentation that messed up Doxygen 2008-05-27 14:00:09 +00:00
fros4943 7fcb9554f4 added timetable aggregate reset function 2008-03-13 14:27:34 +00:00
oliverschmidt 2b24ec3189 The cc65 compiler has a bug that doesn't allow to initialize an automatic struct with references to automatic variables. Therefore I changed the timetable used for measuring the timestamping time from automatic to static - which wastes some bytes in the data segment. If this isn't generally acceptable then an #ifdef __CC65__ seems to be the appropriate approach. 2008-02-28 22:43:40 +00:00
oliverschmidt 20dc5ee52f Adjusted tabs. 2008-02-28 22:11:30 +00:00
oliverschmidt d1ad3d0246 Decorate declaration rather than definition with export attribute. 2008-02-10 11:17:33 +00:00
oliverschmidt 420b06863c Declare some more functions as CCIF (Contiki Core Interface) to trigger exporting the symbols from the main binary on Win32. 2008-02-07 23:04:35 +00:00
oliverschmidt 58d047667d Declare 'autostart_processes' as CLIF (Contiki Loadable Interface) to trigger exporting the symbol from shared libraries on Win32. 2008-02-07 15:47:28 +00:00
oliverschmidt 41beef7cca Removed support for the old method of starting a dynamically loaded process based on the symbol 'process_load'. All loaders now have to use the new method based on the symbol 'autostart_processes'. 2008-02-07 15:43:37 +00:00
adamdunkels f93a48599e Process only one poll request at a time to avoid starvation if one process keeps calling process_poll() from its poll handler 2008-01-24 21:00:51 +00:00
adamdunkels 546efc7b61 Removed remaining debug code 2008-01-23 21:06:25 +00:00
adamdunkels f4dd9ccd5b Rewrote the process code so that initialization events are posted synchronously instead of asynchronously, so that we don't have to explicitly wait for processes to be initialized. This also reduces the size of the event queue by half on the Tmote Sky platform since the queue was maximized during system bootup. This change also prompted an update of the process invokation code to ensure that a process is not invoked again when processing an event. General cleanup of the code also. 2008-01-23 15:18:06 +00:00
adamdunkels 7b71f23abe Factored out the time table keeping code from the profiling code and placed it in a separate 'timetable' module, that may be uesd on its own. 2008-01-17 12:19:25 +00:00
adamdunkels 3d17762735 Added a macro for concatenation of two strings, which may be macro expansions 2008-01-14 09:22:22 +00:00
adamdunkels 1640b11972 The radio driver now takes care of adjusting for the transmission time 2008-01-08 07:54:16 +00:00
oliverschmidt a9ebc469b8 Avoid usage of POSIX function names even for static functions as some indirectly included system header might declare them. 2007-12-23 14:56:54 +00:00
oliverschmidt 1b5ae78a95 Easily avoided double (meant to be a forward ?) definition of timesynch_driver. 2007-12-20 20:30:55 +00:00
adamdunkels d80052c0e7 Removed debug output 2007-12-16 14:48:33 +00:00
adamdunkels 8bf9a08a70 A simple implicit network time synchronization mechanism 2007-12-16 14:29:56 +00:00
oliverschmidt 476848fbe0 Including stddef.h for NULL seems to be somewhat more portable than stdlib.h. 2007-11-18 19:16:49 +00:00
ksb 71dc988cb9 slip.c:
char is signed but uip_buf is unsigned

spi.h:
	casted unused values to void

autostart.c:
autostart.h:
        The array itself should be const but the processes pointed to
        should not.

profile-aggregates.c:
        sizeof returns unsigned long on my platform
2007-11-18 12:27:44 +00:00
oliverschmidt d609db3580 Removed compiler warnings. 2007-11-18 01:36:59 +00:00
adamdunkels b49e9b34b1 reverted the PROCESS_LOAD() commit - the PROCESS_LOAD() code is used by ports such as the win32 and 6502 ports 2007-11-17 22:11:19 +00:00
adamdunkels 2f50fe9c57 Made definition of PROCESS() macro nicer by removing unused PROCESS_LOAD() and PROCESS_NOLOAD() 2007-11-17 18:07:13 +00:00
adamdunkels 1e1e44a3f8 Fixed compiler warnings to make code compile with gcc's -pedantic switch 2007-11-17 18:01:00 +00:00
adamdunkels 5e7cbff22a Fixed compiler warnings 2007-11-17 10:12:19 +00:00
adamdunkels 0fdb3e3ddc Initial implementation of a profiling system for Contiki 2007-10-23 20:39:07 +00:00
adamdunkels d3319f71b3 Made rtimer callback a typedefed type to make function prototypes nicer 2007-10-23 20:33:19 +00:00
joxe 35bff8238d renamed variable, rewrote comment to make easier to read 2007-10-07 19:59:27 +00:00
fros4943 59c75144e8 compare clock_time_t's 2007-09-07 10:20:30 +00:00
matsutsuka 57bd42ac9b Fixed a glitch of CC_CONF_ASSIGN_AGGREGATE. 2007-09-01 00:49:41 +00:00
matsutsuka 9d4fc0a1a8 Support for z80(sdcc) port.
In order to support, some core modules are modified as follows:

core/sys/dsc.h
- If CTK_CONF_ICONS is diabled, the whole icon-related code is disabled.
- DSC_HEADER is changed to remove extra semicolon.

core/sys/process.h
- process_data_t is expressed by void* in signatures (known bug on sdcc).

core/sys/autostart.h
- autostart_processes is changed to remove extra semicolon.

core/sys/cc.h
- CC_CONF_ASSIGN_AGGREGATE is introduced.
- CC_CONF_INC_CAST_POINTER is introduced, a workaround of a kind
  of sdcc bug for an increment.

core/net/hc.c
core/net/uip_arp.c
core/net/uaodv.c
- Aggregation assignments are changed to uip_ipaddr_copy.

core/net/psock.c
core/net/uipbuf.c
core/net/dhcpc.c
apps/shell/shell.c
core/ctk/vnc-server.c
core/ctk/vnc-out.c
- "register" keyword in a signature cannot be used in sdcc,
  CC_REGISTER_ARG is used instead.

core/net/uip-over-mesh.c
- An extra semicolon is removed.

apps/dhcp/dhcp-dsc.c
apps/shell/shell-dsc.
apps/ftp/ftp-dsc.c
apps/process-list/process-list-dsc.c
apps/email/email-dsc.c
apps/webserver/webserver-dsc.c
apps/vnc/vnc-dsc.c
apps/vnc/vnc-viewer.h
apps/webbrowser/www-dsc.c
apps/about/about-dsc.c
apps/irc/irc-dsc.c
apps/telnet/telnet-dsc.c
apps/telnetd/telnetd-dsc.c
apps/netconf/netconf-dsc.c
apps/directory/directory-dsc.c
pps/calc/calc-dsc.c
- Modify an extern type to a real declaration, which is static
  to prevent a compile error.

core/net/mac/xmac.c
- Variables cannot be defined in a head of block on sdcc.

core/ctk/ctk.h
core/ctk/ctk.c
apps/program-handler/program-handler.c
- If CTK_CONF_ICONS is diabled, the whole icon-related code is disabled.

Makefile.include
- Add a set of configuration for an assembler.
- $(CLEAN) variable is introduced for customized cleanup.

apps/process-list/process-list.c
- PROCESSLIST_CONF_HEIGHT is introduced to address smaller screen size.

core/lib/ctk-filedialog.c
- FILES_CONF_HEIGHT is introduced to address smaller screen size.
- "register" keyword in a signature cannot be used in sdcc,
  CC_REGISTER_ARG is used instead.

apps/vnc/vnc-viewer.c
- A cast is added to prevent a compile error.
- "register" keyword in a signature cannot be used in sdcc,
  CC_REGISTER_ARG is used instead.

apps/webbrowser/webclient.c
- CC_CONF_INC_CAST_POINTER is introduced, a workaround of a kind
  of sdcc bug for an increment.

core/loader/elfloader.c
- A cast is added to prevent a compile error.

core/net/rime/rimeaddr.c
- An initialization is added to prevent a compile error.

core/net/rime/rudolph0.c
- NULL is changed to 0, because NULL causes a compile error.

core/net/rime/route-discovery.c
- Add an argument to match the definition of nf_callbacks.

cpu/z80/strcasecmp.h
cpu/z80/strcasecmp.c
cpu/z80/contiki-sdcc-conf.h
cpu/z80/mtarch.c
cpu/z80/mtarch.h
cpu/z80/Makefile.z80
- New files to make compilation availble on sdcc.
- Added support for multithreading.
2007-08-30 14:39:16 +00:00
ksb 48e7ef8bc9 Changed macros to not include a trailing semicolon. 2007-08-22 10:49:48 +00:00
oliverschmidt d13a66e63a Fixed typo. 2007-05-27 11:11:28 +00:00
oliverschmidt a09d1d043c Finally moved service.[c|h] into backyard. The "only" user left in outside backyard is the CTK on GTK simulation layer - which needs to be updated to build / run again... 2007-05-26 23:23:28 +00:00
oliverschmidt 6275ef313c Removed the empty PROCESS_NO_BROADCAST macro. 2007-05-23 22:16:05 +00:00
adamdunkels 9277197506 Documentation fix. 2007-05-22 20:58:49 +00:00
adamdunkels 95706ae1aa Documentation fix. Number of rtimers configurable with contiki-conf.h 2007-05-22 20:58:38 +00:00
adamdunkels ef4b12437b Removed unused code 2007-05-22 20:58:14 +00:00
adamdunkels dc205a6982 Added error return value 2007-05-17 00:24:29 +00:00
adamdunkels c4b212898b Bugfix: should not invoke timer if timer list is empty. 2007-05-17 00:23:58 +00:00
nifi 0abdde6197 corrected comment 2007-04-04 09:19:18 +00:00
oliverschmidt 1d63347cfc Added mt_stop() calling mtarch_stop() to allow for thread resource cleanup. 2007-04-03 18:47:21 +00:00
adamdunkels d42b91fd20 Documentation updates 2007-04-02 18:07:10 +00:00
adamdunkels 03b2399622 Correct function prototype 2007-03-31 11:20:20 +00:00
adamdunkels b0b7afb802 Removed erroneous documentation 2007-03-30 00:04:12 +00:00
adamdunkels 210574cf22 Fixed API to be consistent between .h and .c file 2007-03-28 20:28:22 +00:00
adamdunkels af92a79635 Spelling error fix 2007-03-28 19:52:50 +00:00
adamdunkels 6a8d8e3abf Added experimental clock_fine() function 2007-03-25 21:51:31 +00:00
adamdunkels 31fea520ea Debug output 2007-03-25 17:16:57 +00:00
adamdunkels 503b76266b Renamed rt module to rtimer 2007-03-25 17:10:30 +00:00
adamdunkels 31a4d8504a Initial code for a Contiki real-time scheduler 2007-03-19 00:16:13 +00:00
adamdunkels 786d0d1892 Copyright update 2007-03-15 21:46:07 +00:00
bg- 58bbd0b4da * Don't include signal.h. 2007-01-24 16:07:20 +00:00
nifi 755ee04e24 major bug fix: arithmetic was done incorrectly in update_time() + process already expired timers when adding timers 2006-10-09 16:05:58 +00:00
adamdunkels 20b05c6d22 Added PROCESS_PT_SPAWN, PROCESS_WAIT_UNTIL 2006-10-09 11:54:29 +00:00
adamdunkels 1504f2836e Commented out unused functionality: the ability to create a process running a thread was never used. With the new code, only running 'bare' threads is supported. If support for creating processes with a thread is needed, it may be reneabled later but currently there doesn't seem to be a need for it 2006-09-26 20:59:51 +00:00
adamdunkels 6bd28132ed Fixed the behaviour of PT_SCHEDULE() so that it returns true if a protothread is still active (yielded or waiting). Thanks to Kevin Collins for fixing. 2006-09-26 20:57:58 +00:00
adamdunkels 25a132cff2 A module that allows Contiki processes to have subprocesses. A subprocess is defined within another process and is created on the fly when needed. 2006-09-26 20:53:27 +00:00
oliverschmidt 83561d8963 Added the CCIF (Contiki Core InterFace) declarations necessary for a loadable packet driver. 2006-09-09 23:24:39 +00:00
adamdunkels ea13dd9179 #if 0:ed out unused code 2006-09-01 22:56:47 +00:00
oliverschmidt 424fde144d Added the CCIF (Contiki Core InterFace) declarations used by the applications which are currently part of the Win32 build. 2006-08-26 23:54:00 +00:00
bg- e4e3a11b8b New function process_nevents(). 2006-08-17 15:39:24 +00:00
oliverschmidt 43e9e3caa0 Added main header include. 2006-08-14 23:39:23 +00:00
adamdunkels c9e808d638 Import of the contiki-2.x development code from the SICS internal CVS server 2006-06-17 22:41:10 +00:00