Just always call process_run() and etimer_request_poll() in turn - like the "major" platforms do.

This commit is contained in:
oliverschmidt 2010-10-27 22:17:39 +00:00
parent 258e3cc93a
commit 0ef1171705
5 changed files with 22 additions and 27 deletions

View file

@ -30,7 +30,7 @@
*
* Author: Oliver Schmidt <ol.sc@web.de>
*
* $Id: contiki-main.c,v 1.22 2010/10/23 08:17:45 oliverschmidt Exp $
* $Id: contiki-main.c,v 1.23 2010/10/27 22:17:39 oliverschmidt Exp $
*/
#include "contiki-net.h"
@ -105,12 +105,11 @@ main(void)
while(1) {
clock_update();
if(process_run() < 2) {
process_run();
etimer_request_poll();
}
clock_update();
}
}
/*-----------------------------------------------------------------------------------*/

View file

@ -30,7 +30,7 @@
*
* Author: Oliver Schmidt <ol.sc@web.de>
*
* $Id: contiki-main.c,v 1.4 2010/10/23 08:17:45 oliverschmidt Exp $
* $Id: contiki-main.c,v 1.5 2010/10/27 22:17:39 oliverschmidt Exp $
*/
#include "contiki-net.h"
@ -101,10 +101,9 @@ main(void)
while(1) {
if(process_run() < 2) {
process_run();
etimer_request_poll();
}
}
}
/*-----------------------------------------------------------------------------------*/

View file

@ -30,7 +30,7 @@
*
* Author: Oliver Schmidt <ol.sc@web.de>
*
* $Id: contiki-main.c,v 1.9 2010/10/23 08:17:45 oliverschmidt Exp $
* $Id: contiki-main.c,v 1.10 2010/10/27 22:17:39 oliverschmidt Exp $
*/
#include <string.h>
@ -119,10 +119,9 @@ main(void)
while(1) {
if(process_run() < 2) {
process_run();
etimer_request_poll();
}
}
}
/*-----------------------------------------------------------------------------------*/

View file

@ -30,7 +30,7 @@
*
* Author: Oliver Schmidt <ol.sc@web.de>
*
* $Id: contiki-main.c,v 1.24 2010/10/23 08:17:45 oliverschmidt Exp $
* $Id: contiki-main.c,v 1.25 2010/10/27 22:17:39 oliverschmidt Exp $
*/
#include <string.h>
@ -117,10 +117,9 @@ main(void)
while(1) {
if(process_run() < 2) {
process_run();
etimer_request_poll();
}
}
}
/*-----------------------------------------------------------------------------------*/

View file

@ -30,7 +30,7 @@
*
* Author: Oliver Schmidt <ol.sc@web.de>
*
* $Id: contiki-main.c,v 1.20 2010/10/19 20:30:47 oliverschmidt Exp $
* $Id: contiki-main.c,v 1.21 2010/10/27 22:17:39 oliverschmidt Exp $
*/
#define WIN32_LEAN_AND_MEAN
@ -123,16 +123,15 @@ main(void)
while(1) {
if(process_run() < 2) {
process_run();
if(console_resize()) {
ctk_restore();
}
etimer_request_poll();
/* Allow user-mode APC to execute. */
SleepEx(10, TRUE);
etimer_request_poll();
if(console_resize()) {
ctk_restore();
}
}
}