1
0
mirror of git://projects.qi-hardware.com/iris.git synced 2024-07-01 00:44:31 +03:00

bugfixes, not complete

This commit is contained in:
Bas Wijnen 2009-08-12 21:06:46 +02:00
parent fb5a321554
commit 5198fd8db4
6 changed files with 12 additions and 12 deletions

View File

@ -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")

View File

@ -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
View File

@ -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)
{

View File

@ -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.

View File

@ -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)

4
plan Normal file
View File

@ -0,0 +1,4 @@
kernel capabilities: 1 per aktie; bevat code in plaats van bitmask. CREATE ipv DEGRADE.
activation address in receiver
message: a0-a3: data; protectedL; protectedH; caps
caps zonder size limit?