/SPARTAN/trunk/src/synch/rwlock.c |
---|
184,10 → 184,10 |
cpu_priority_restore(pri); |
break; |
case ESYNCH_OK_ATOMIC: |
panic(PANIC "_mutex_lock_timeout()==ESYNCH_OK_ATOMIC"); |
panic("_mutex_lock_timeout()==ESYNCH_OK_ATOMIC"); |
break; |
dafault: |
panic(PANIC "invalid ESYNCH"); |
panic("invalid ESYNCH"); |
break; |
} |
return rc; |
/SPARTAN/trunk/src/main/kinit.c |
---|
119,17 → 119,17 |
* Create the first user task. |
*/ |
m = vm_create(); |
if (!m) panic(PANIC "vm_create"); |
if (!m) panic("vm_create"); |
u = task_create(m); |
if (!u) panic(PANIC "task_create"); |
if (!u) panic("task_create"); |
t = thread_create(uinit, NULL, u, THREAD_USER_STACK); |
if (!t) panic(PANIC "thread_create"); |
if (!t) panic("thread_create"); |
/* |
* Create the text vm_area and copy the userspace code there. |
*/ |
a = vm_area_create(m, VMA_TEXT, 1, UTEXT_ADDRESS); |
if (!a) panic(PANIC "vm_area_create: vm_text"); |
if (!a) panic("vm_area_create: vm_text"); |
memcopy((__address) utext, PA2KA(a->mapping[0]), utext_size < PAGE_SIZE ? utext_size : PAGE_SIZE); |
/* |
136,7 → 136,7 |
* Create the data vm_area. |
*/ |
a = vm_area_create(m, VMA_STACK, 1, USTACK_ADDRESS); |
if (!a) panic(PANIC "vm_area_create: vm_stack"); |
if (!a) panic("vm_area_create: vm_stack"); |
thread_ready(t); |
#endif /* __USERSPACE__ */ |
/SPARTAN/trunk/src/main/main.c |
---|
29,6 → 29,7 |
#include <arch/asm.h> |
#include <arch/context.h> |
#include <print.h> |
#include <panic.h> |
#include <config.h> |
#include <time/clock.h> |
#include <proc/scheduler.h> |
/SPARTAN/trunk/src/debug/print.c |
---|
46,11 → 46,11 |
*/ |
void print_str(const char *str) |
{ |
int i = 0; |
int i = 0; |
char c; |
while (c = str[i++]) |
putchar(c); |
putchar(c); |
} |
84,12 → 84,12 |
* be in range 2 .. 16). |
* |
*/ |
void print_number(const __native num, const int base) |
void print_number(const __native num, const unsigned int base) |
{ |
int val = num; |
char d[sizeof(__native)*8+1]; /* this is good enough even for base == 2 */ |
int i = sizeof(__native)*8-1; |
int i = sizeof(__native)*8-1; |
do { |
d[i--] = digits[val % base]; |
} while (val /= base); |
/SPARTAN/trunk/src/time/timeout.c |
---|
30,6 → 30,7 |
#include <typedefs.h> |
#include <arch/types.h> |
#include <config.h> |
#include <panic.h> |
#include <synch/spinlock.h> |
#include <func.h> |
#include <cpu.h> |
/SPARTAN/trunk/src/proc/scheduler.c |
---|
37,6 → 37,7 |
#include <arch.h> |
#include <arch/asm.h> |
#include <list.h> |
#include <panic.h> |
#include <typedefs.h> |
#include <mm/page.h> |
#include <synch/spinlock.h> |
/SPARTAN/trunk/src/mm/vm.c |
---|
62,7 → 62,7 |
vm_area_t *a; |
if (addr % PAGE_SIZE) |
panic(PANIC "addr not aligned to a page boundary"); |
panic("addr not aligned to a page boundary"); |
pri = cpu_priority_high(); |
spinlock_lock(&m->lock); |
124,7 → 124,7 |
flags = PAGE_READ | PAGE_WRITE | PAGE_USER | PAGE_PRESENT | PAGE_CACHEABLE; |
break; |
default: |
panic(PANIC "unexpected vm_type_t %d", a->type); |
panic("unexpected vm_type_t %d", a->type); |
} |
for (i=0; i<a->size; i++) |
/SPARTAN/trunk/src/mm/frame.c |
---|
71,7 → 71,7 |
frame_bitmap = (__u8 *) malloc(frame_bitmap_octets); |
if (!frame_bitmap) |
panic(PANIC "malloc/frame_bitmap\n"); |
panic("malloc/frame_bitmap\n"); |
/* |
* Mark all frames free. |
144,16 → 144,16 |
return i*FRAME_SIZE; |
} |
} |
panic(PANIC "frames_free inconsistent (%d)\n", frames_free); |
panic("frames_free inconsistent (%d)\n", frames_free); |
} |
spinlock_unlock(&framelock); |
cpu_priority_restore(pri); |
if (flags & FRAME_PANIC) |
panic(PANIC "unable to allocate frame\n"); |
panic("unable to allocate frame\n"); |
/* TODO: implement sleeping logic here */ |
panic(PANIC "sleep not supported\n"); |
panic("sleep not supported\n"); |
goto loop; |
} |
195,9 → 195,9 |
frames_free++; |
} |
} |
else panic(PANIC "frame_free: frame already free\n"); |
else panic("frame_free: frame already free\n"); |
} |
else panic(PANIC "frame_free: frame number too big\n"); |
else panic("frame_free: frame number too big\n"); |
spinlock_unlock(&framelock); |
cpu_priority_restore(pri); |
/SPARTAN/trunk/src/mm/heap.c |
---|
30,6 → 30,7 |
#include <synch/spinlock.h> |
#include <func.h> |
#include <memstr.h> |
#include <panic.h> |
#include <arch/types.h> |
/* |