- Timestamp:
- 2005-05-11T19:51:55Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 69515260
- Parents:
- 45671f48
- Location:
- src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
src/debug/print.c
r45671f48 r02a99d2 47 47 void print_str(const char *str) 48 48 { 49 49 int i = 0; 50 50 char c; 51 51 52 52 while (c = str[i++]) 53 53 putchar(c); 54 54 } 55 55 … … 85 85 * 86 86 */ 87 void print_number(const __native num, const int base)87 void print_number(const __native num, const unsigned int base) 88 88 { 89 89 int val = num; 90 90 char d[sizeof(__native)*8+1]; /* this is good enough even for base == 2 */ 91 92 91 int i = sizeof(__native)*8-1; 92 93 93 do { 94 94 d[i--] = digits[val % base]; -
src/main/kinit.c
r45671f48 r02a99d2 120 120 */ 121 121 m = vm_create(); 122 if (!m) panic( PANIC"vm_create");122 if (!m) panic("vm_create"); 123 123 u = task_create(m); 124 if (!u) panic( PANIC"task_create");124 if (!u) panic("task_create"); 125 125 t = thread_create(uinit, NULL, u, THREAD_USER_STACK); 126 if (!t) panic( PANIC"thread_create");126 if (!t) panic("thread_create"); 127 127 128 128 /* … … 130 130 */ 131 131 a = vm_area_create(m, VMA_TEXT, 1, UTEXT_ADDRESS); 132 if (!a) panic( PANIC"vm_area_create: vm_text");132 if (!a) panic("vm_area_create: vm_text"); 133 133 memcopy((__address) utext, PA2KA(a->mapping[0]), utext_size < PAGE_SIZE ? utext_size : PAGE_SIZE); 134 134 … … 137 137 */ 138 138 a = vm_area_create(m, VMA_STACK, 1, USTACK_ADDRESS); 139 if (!a) panic( PANIC"vm_area_create: vm_stack");139 if (!a) panic("vm_area_create: vm_stack"); 140 140 141 141 thread_ready(t); -
src/main/main.c
r45671f48 r02a99d2 30 30 #include <arch/context.h> 31 31 #include <print.h> 32 #include <panic.h> 32 33 #include <config.h> 33 34 #include <time/clock.h> -
src/mm/frame.c
r45671f48 r02a99d2 72 72 frame_bitmap = (__u8 *) malloc(frame_bitmap_octets); 73 73 if (!frame_bitmap) 74 panic( PANIC"malloc/frame_bitmap\n");74 panic("malloc/frame_bitmap\n"); 75 75 76 76 /* … … 145 145 } 146 146 } 147 panic( PANIC"frames_free inconsistent (%d)\n", frames_free);147 panic("frames_free inconsistent (%d)\n", frames_free); 148 148 } 149 149 spinlock_unlock(&framelock); … … 151 151 152 152 if (flags & FRAME_PANIC) 153 panic( PANIC"unable to allocate frame\n");153 panic("unable to allocate frame\n"); 154 154 155 155 /* TODO: implement sleeping logic here */ 156 panic( PANIC"sleep not supported\n");156 panic("sleep not supported\n"); 157 157 158 158 goto loop; … … 196 196 } 197 197 } 198 else panic( PANIC"frame_free: frame already free\n");199 } 200 else panic( PANIC"frame_free: frame number too big\n");198 else panic("frame_free: frame already free\n"); 199 } 200 else panic("frame_free: frame number too big\n"); 201 201 202 202 spinlock_unlock(&framelock); -
src/mm/heap.c
r45671f48 r02a99d2 31 31 #include <func.h> 32 32 #include <memstr.h> 33 #include <panic.h> 33 34 #include <arch/types.h> 34 35 -
src/mm/vm.c
r45671f48 r02a99d2 63 63 64 64 if (addr % PAGE_SIZE) 65 panic( PANIC"addr not aligned to a page boundary");65 panic("addr not aligned to a page boundary"); 66 66 67 67 pri = cpu_priority_high(); … … 125 125 break; 126 126 default: 127 panic( PANIC"unexpected vm_type_t %d", a->type);127 panic("unexpected vm_type_t %d", a->type); 128 128 } 129 129 -
src/proc/scheduler.c
r45671f48 r02a99d2 38 38 #include <arch/asm.h> 39 39 #include <list.h> 40 #include <panic.h> 40 41 #include <typedefs.h> 41 42 #include <mm/page.h> -
src/synch/rwlock.c
r45671f48 r02a99d2 185 185 break; 186 186 case ESYNCH_OK_ATOMIC: 187 panic( PANIC"_mutex_lock_timeout()==ESYNCH_OK_ATOMIC");187 panic("_mutex_lock_timeout()==ESYNCH_OK_ATOMIC"); 188 188 break; 189 189 dafault: 190 panic( PANIC"invalid ESYNCH");190 panic("invalid ESYNCH"); 191 191 break; 192 192 } -
src/time/timeout.c
r45671f48 r02a99d2 31 31 #include <arch/types.h> 32 32 #include <config.h> 33 #include <panic.h> 33 34 #include <synch/spinlock.h> 34 35 #include <func.h>
Note:
See TracChangeset
for help on using the changeset viewer.