[Tinyos-commits] CVS: tinyos-1.x/tos/system sched.c,1.7,1.8
David Gay
idgay at users.sourceforge.net
Mon Jun 20 15:08:27 PDT 2005
Update of /cvsroot/tinyos/tinyos-1.x/tos/system
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6158
Modified Files:
sched.c
Log Message:
replace TOSH_sleep with __nesc_atomic_sleep (enable intr+sleep in one go),
to fix deadlock
Index: sched.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/system/sched.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** sched.c 23 Feb 2005 20:42:24 -0000 1.7
--- sched.c 20 Jun 2005 22:08:24 -0000 1.8
***************
*** 77,84 ****
volatile uint8_t TOSH_sched_free;
- /* These are provided in HPL.td */
- void TOSH_wait(void);
- void TOSH_sleep(void);
-
void TOSH_sched_init(void)
{
--- 77,80 ----
***************
*** 149,153 ****
if (func == NULL)
{
! __nesc_atomic_end(fInterruptFlags);
return 0;
}
--- 145,149 ----
if (func == NULL)
{
! __nesc_atomic_sleep();
return 0;
}
***************
*** 162,168 ****
void TOSH_run_task() {
! while (TOSH_run_next_task())
! ;
! TOSH_sleep();
! TOSH_wait();
}
--- 158,162 ----
void TOSH_run_task() {
! for (;;)
! TOSH_run_next_task();
}
More information about the Tinyos-commits
mailing list