[core sched]

* fixed thread_getlastpid()
* enable interrupts again in thread_sleep() to avoid getting stuck w/
    disabled interrupts

[cpu lpc2387]
* added hwtimer as dependency for MCI driver

[project test_*]

* fixed some expect scripts
dev/timer
Oliver Hahm 11 years ago
parent 2109f7dc86
commit a20088f6e8

@ -113,8 +113,8 @@ void sched_run() {
// break;
// }
// }
if (my_active_thread->pid != last_pid) {
last_pid = my_active_thread->pid;
if (active_thread->pid != last_pid) {
last_pid = active_thread->pid;
}
}

@ -45,6 +45,7 @@ void thread_sleep() {
if ( inISR()) return;
dINT();
sched_set_status((tcb_t*)active_thread, STATUS_SLEEPING);
eINT();
thread_yield();
}

@ -33,7 +33,7 @@ UseModule cpu ;
Module rtc : lpc2387-rtc.c ;
Module gpioint : lpc2387-gpioint.c ;
Module adc : lpc2387-adc.c ;
Module mci : lpc2387-mci.c asmfunc.s ;
Module mci : lpc2387-mci.c asmfunc.s : hwtimer ;
Objects startup.s ;

@ -572,7 +572,6 @@ DSTATUS MCI_initialize (void) {
if (!send_cmd(CMD9, (unsigned long)CardRCA << 16, 2, resp)) /* Get CSD and save it */
{
//printf("MCI CMD9 fail\n");
goto di_fail;
}
for (n = 0; n < 4; n++) bswap_cp(&CardInfo[n * 4], &resp[n]);

@ -9,7 +9,7 @@ child = pexpect.spawn ("board/msba2/tools/bin/pseudoterm %s" % os.environ["PORT"
null = open('/dev/null', 'wb')
subprocess.call(['jam', 'reset'], stdout=null)
child.expect ('OK\r\n');
child.expect ('[OK].\r\n');
child.expect ('callback1\r\n');
child.expect ('callback3\r\n');
child.expect ('callback2\r\n');

@ -4,8 +4,11 @@ set timeout 5
spawn pseudoterm $env(PORT)
sleep 1
send "\n"
send "\n"
expect {
">$" {}
">" {}
timeout { exit 1 }
}
@ -16,12 +19,11 @@ expect {
}
expect {
">$" {}
">" {}
timeout { exit 1 }
}
send "end_test\n"
expect {
"\[TEST_END\]" {}
timeout { exit 1 }

@ -5,9 +5,10 @@ set timeout 1
spawn pseudoterm $env(PORT)
sleep 1
send "\n"
send "\n"
expect {
">$" {}
">" {}
timeout { exit 1 }
}
@ -67,7 +68,7 @@ expect {
}
expect {
">$" {}
">" {}
timeout { exit 1 }
}

@ -5,15 +5,16 @@ set timeout 2
spawn pseudoterm $env(PORT)
sleep 1
send "\n"
send "\n"
expect {
">$" {}
">" {}
timeout { exit 1 }
}
send "some_definately_unknown_command\n"
expect {
"shell: command "some_definately_unknown_command" not found." {}
"shell: command not found." {}
timeout { exit 1 }
}

@ -39,10 +39,7 @@ int main(void)
thread_print_all();
printf("Waking up sleeper.\n");
thread_wakeup(pid);
<<<<<<< HEAD
=======
thread_print_all();
>>>>>>> master
thread_yield();
}
}

Loading…
Cancel
Save