mirror of
git://projects.qi-hardware.com/iris.git
synced 2025-01-16 22:51:06 +02:00
bugfixes, not complete
This commit is contained in:
parent
fb5a321554
commit
5198fd8db4
@ -61,7 +61,7 @@ char const *decode_kbd = "0123456789abcdefghijklmnopqrstuvwxyz!@#$%^&*() T\n[],.
|
||||
|
||||
int main ():
|
||||
// Set up lcd first
|
||||
schedule ()
|
||||
//schedule ()
|
||||
kdebug ("start init\n")
|
||||
setup ()
|
||||
kdebug ("run init\n")
|
||||
|
@ -121,8 +121,6 @@ static void log_msg (Message *msg):
|
||||
log_char ('\n')
|
||||
|
||||
int main ():
|
||||
__asm__ volatile ("break")
|
||||
|
||||
map_lcd ()
|
||||
map_cpm ()
|
||||
|
||||
|
4
iris.h
4
iris.h
@ -212,7 +212,7 @@ static void invoke (Capability target, Message *msg)
|
||||
|
||||
static void wait (Message *msg, Capability r0, Capability r1, Capability r2, Capability r3)
|
||||
{
|
||||
__asm__ volatile ("li $v0, 0x80000000\n"
|
||||
__asm__ volatile ("li $v0, ~0\n"
|
||||
"\tlw $t4, %1\n"
|
||||
"\tlw $t5, %2\n"
|
||||
"\tlw $t6, %3\n"
|
||||
@ -1004,7 +1004,7 @@ static void caps_set (Capability caps, Capability cap, unsigned index)
|
||||
#else
|
||||
#define kdebug_char(c) do {} while (0)
|
||||
#endif
|
||||
#define kdebug(str) do { const char *s = (str); while (*s) kdebug_char (*s++); } while (0)
|
||||
#define kdebug(str) do { const char *s = (str); while (*s) { kdebug_char (*s); ++s; } } while (0)
|
||||
|
||||
static void kdebug_num (unsigned n)
|
||||
{
|
||||
|
@ -149,13 +149,11 @@ static void arch_invoke ():
|
||||
c.data[2] = old_current->arch.t2
|
||||
c.data[3] = old_current->arch.t3
|
||||
target->invoke (&c)
|
||||
if do_schedule:
|
||||
// If the call was to schedule without wait, it isn't done yet.
|
||||
if !wait:
|
||||
if do_schedule && !wait:
|
||||
// If the call was to schedule without wait, it isn't done yet.
|
||||
schedule ()
|
||||
//else:
|
||||
// If the caller received an immediate reply from the kernel, it is no longer set as current. Don't let it lose its timeslice.
|
||||
if old_current != current && (old_current->flags & (THREAD_FLAG_RUNNING | THREAD_FLAG_WAITING)) == THREAD_FLAG_RUNNING:
|
||||
else if old_current != current && (old_current->flags & (THREAD_FLAG_RUNNING | THREAD_FLAG_WAITING)) == THREAD_FLAG_RUNNING:
|
||||
// If the caller received an immediate reply from the kernel, it is no longer set as current. Don't let it lose its timeslice.
|
||||
current = old_current
|
||||
|
||||
/// A general exception has occurred.
|
||||
|
@ -93,7 +93,7 @@ void set_leds (bool a, bool b):
|
||||
void dbg_log_char (unsigned ch):
|
||||
void dbg_log (char const *str):
|
||||
void dbg_log_num (unsigned num):
|
||||
void send (unsigned n):
|
||||
static void send (unsigned n):
|
||||
for unsigned i = 0; i < 32; ++i:
|
||||
bool v = n & (1 << 31)
|
||||
set_leds (v, !v)
|
||||
|
Loading…
x
Reference in New Issue
Block a user