Changeset a000878c in mainline for kernel/generic
- Timestamp:
- 2010-02-25T19:11:25Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 958de16
- Parents:
- a634485
- Location:
- kernel/generic
- Files:
-
- 25 edited
-
include/console/chardev.h (modified) (3 diffs)
-
include/console/kconsole.h (modified) (1 diff)
-
include/interrupt.h (modified) (1 diff)
-
include/lib/elf.h (modified) (1 diff)
-
include/mm/slab.h (modified) (2 diffs)
-
include/panic.h (modified) (1 diff)
-
include/proc/task.h (modified) (1 diff)
-
include/proc/thread.h (modified) (2 diffs)
-
include/stacktrace.h (modified) (1 diff)
-
include/symtab.h (modified) (1 diff)
-
include/synch/spinlock.h (modified) (2 diffs)
-
src/console/chardev.c (modified) (2 diffs)
-
src/console/cmd.c (modified) (2 diffs)
-
src/console/kconsole.c (modified) (1 diff)
-
src/debug/stacktrace.c (modified) (2 diffs)
-
src/debug/symtab.c (modified) (2 diffs)
-
src/interrupt/interrupt.c (modified) (3 diffs)
-
src/lib/elf.c (modified) (2 diffs)
-
src/main/kinit.c (modified) (1 diff)
-
src/main/version.c (modified) (1 diff)
-
src/mm/slab.c (modified) (5 diffs)
-
src/proc/task.c (modified) (1 diff)
-
src/proc/thread.c (modified) (2 diffs)
-
src/synch/spinlock.c (modified) (1 diff)
-
src/sysinfo/sysinfo.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/console/chardev.h
ra634485 ra000878c 53 53 /** Character input device. */ 54 54 typedef struct indev { 55 c har *name;55 const char *name; 56 56 waitq_t wq; 57 57 … … 81 81 /** Character output device. */ 82 82 typedef struct outdev { 83 c har *name;83 const char *name; 84 84 85 85 /** Protects everything below. */ … … 95 95 } outdev_t; 96 96 97 extern void indev_initialize(c har *name, indev_t *indev,97 extern void indev_initialize(const char *name, indev_t *indev, 98 98 indev_operations_t *op); 99 99 extern void indev_push_character(indev_t *indev, wchar_t ch); 100 100 extern wchar_t indev_pop_character(indev_t *indev); 101 101 102 extern void outdev_initialize(c har *name, outdev_t *outdev,102 extern void outdev_initialize(const char *name, outdev_t *outdev, 103 103 outdev_operations_t *op); 104 104 -
kernel/generic/include/console/kconsole.h
ra634485 ra000878c 94 94 extern void kconsole_notify_init(void); 95 95 extern bool kconsole_check_poll(void); 96 extern void kconsole(c har *prompt,char *msg, bool kcon);96 extern void kconsole(const char *prompt, const char *msg, bool kcon); 97 97 extern void kconsole_thread(void *data); 98 98 -
kernel/generic/include/interrupt.h
ra634485 ra000878c 46 46 typedef void (* iroutine)(int n, istate_t *istate); 47 47 48 extern void fault_if_from_uspace(istate_t *istate, c har *fmt, ...);48 extern void fault_if_from_uspace(istate_t *istate, const char *fmt, ...); 49 49 extern iroutine exc_register(int n, const char *name, iroutine f); 50 50 extern void exc_dispatch(int n, istate_t *t); -
kernel/generic/include/lib/elf.h
ra634485 ra000878c 338 338 #endif 339 339 340 extern c har *elf_error(unsigned int rc);340 extern const char *elf_error(unsigned int rc); 341 341 342 342 /* Interpreter string used to recognize the program loader */ -
kernel/generic/include/mm/slab.h
ra634485 ra000878c 86 86 87 87 typedef struct { 88 c har *name;88 const char *name; 89 89 90 90 link_t link; … … 123 123 } slab_cache_t; 124 124 125 extern slab_cache_t *slab_cache_create(c har *, size_t, size_t,125 extern slab_cache_t *slab_cache_create(const char *, size_t, size_t, 126 126 int (*)(void *, int), int (*)(void *), int); 127 127 extern void slab_cache_destroy(slab_cache_t *); -
kernel/generic/include/panic.h
ra634485 ra000878c 60 60 extern bool silent; 61 61 62 extern void panic_printf(c har *fmt, ...) __attribute__((noreturn));62 extern void panic_printf(const char *fmt, ...) __attribute__((noreturn)); 63 63 64 64 #endif -
kernel/generic/include/proc/task.h
ra634485 ra000878c 130 130 extern void task_init(void); 131 131 extern void task_done(void); 132 extern task_t *task_create(as_t *as, c har *name);132 extern task_t *task_create(as_t *as, const char *name); 133 133 extern void task_destroy(task_t *t); 134 134 extern task_t *task_find_by_id(task_id_t id); -
kernel/generic/include/proc/thread.h
ra634485 ra000878c 52 52 #define THREAD_NAME_BUFLEN 20 53 53 54 extern c har *thread_states[];54 extern const char *thread_states[]; 55 55 56 56 /* Thread flags */ … … 225 225 226 226 extern void thread_init(void); 227 extern thread_t *thread_create(void (*)(void *), void *, task_t *, int, char *,228 bool);227 extern thread_t *thread_create(void (*)(void *), void *, task_t *, int, 228 const char *, bool); 229 229 extern void thread_attach(thread_t *, task_t *); 230 230 extern void thread_ready(thread_t *); -
kernel/generic/include/stacktrace.h
ra634485 ra000878c 46 46 bool (* frame_pointer_prev)(uintptr_t, uintptr_t *); 47 47 bool (* return_address_get)(uintptr_t, uintptr_t *); 48 bool (* symbol_resolve)(uintptr_t, c har **, uintptr_t *);48 bool (* symbol_resolve)(uintptr_t, const char **, uintptr_t *); 49 49 } stack_trace_ops_t; 50 50 -
kernel/generic/include/symtab.h
ra634485 ra000878c 45 45 }; 46 46 47 extern int symtab_name_lookup(uintptr_t, c har **, uintptr_t *);48 extern c har *symtab_fmt_name_lookup(uintptr_t);47 extern int symtab_name_lookup(uintptr_t, const char **, uintptr_t *); 48 extern const char *symtab_fmt_name_lookup(uintptr_t); 49 49 extern int symtab_addr_lookup(const char *, uintptr_t *); 50 50 extern void symtab_print_search(const char *); -
kernel/generic/include/synch/spinlock.h
ra634485 ra000878c 48 48 49 49 #ifdef CONFIG_DEBUG_SPINLOCK 50 c har *name;50 const char *name; 51 51 #endif 52 52 } spinlock_t; … … 101 101 SPINLOCK_STATIC_INITIALIZE_NAME(lock_name, #lock_name) 102 102 103 extern void spinlock_initialize(spinlock_t *lock, c har *name);103 extern void spinlock_initialize(spinlock_t *lock, const char *name); 104 104 extern int spinlock_trylock(spinlock_t *lock); 105 105 extern void spinlock_lock_debug(spinlock_t *lock); -
kernel/generic/src/console/chardev.c
ra634485 ra000878c 47 47 * 48 48 */ 49 void indev_initialize(c har *name, indev_t *indev,49 void indev_initialize(const char *name, indev_t *indev, 50 50 indev_operations_t *op) 51 51 { … … 130 130 * 131 131 */ 132 void outdev_initialize(c har *name, outdev_t *outdev,132 void outdev_initialize(const char *name, outdev_t *outdev, 133 133 outdev_operations_t *op) 134 134 { -
kernel/generic/src/console/cmd.c
ra634485 ra000878c 1033 1033 /* Execute the test */ 1034 1034 test_quiet = false; 1035 c har *ret = test->entry();1035 const char *ret = test->entry(); 1036 1036 1037 1037 /* Update and read thread accounting */ … … 1086 1086 /* Execute the test */ 1087 1087 test_quiet = true; 1088 c har *ret = test->entry();1088 const char *ret = test->entry(); 1089 1089 1090 1090 /* Update and read thread accounting */ -
kernel/generic/src/console/kconsole.c
ra634485 ra000878c 643 643 * 644 644 */ 645 void kconsole(c har *prompt,char *msg, bool kcon)645 void kconsole(const char *prompt, const char *msg, bool kcon) 646 646 { 647 647 if (!stdin) { -
kernel/generic/src/debug/stacktrace.c
ra634485 ra000878c 44 44 { 45 45 int cnt = 0; 46 c har *symbol;46 const char *symbol; 47 47 uintptr_t offset; 48 48 49 49 while (cnt++ < STACK_FRAMES_MAX && ops->frame_pointer_validate(fp)) { 50 50 if (ops->symbol_resolve && … … 85 85 } 86 86 87 static bool kernel_symbol_resolve(uintptr_t addr, c har **sp, uintptr_t *op)87 static bool kernel_symbol_resolve(uintptr_t addr, const char **sp, uintptr_t *op) 88 88 { 89 89 return (symtab_name_lookup(addr, sp, op) == 0); -
kernel/generic/src/debug/symtab.c
ra634485 ra000878c 54 54 * 55 55 */ 56 int symtab_name_lookup(uintptr_t addr, c har **name, uintptr_t *offset)56 int symtab_name_lookup(uintptr_t addr, const char **name, uintptr_t *offset) 57 57 { 58 58 #ifdef CONFIG_SYMTAB … … 92 92 * 93 93 */ 94 c har *symtab_fmt_name_lookup(uintptr_t addr)95 { 96 c har *name;94 const char *symtab_fmt_name_lookup(uintptr_t addr) 95 { 96 const char *name; 97 97 int rc = symtab_name_lookup(addr, &name, NULL); 98 98 -
kernel/generic/src/interrupt/interrupt.c
ra634485 ra000878c 114 114 115 115 /** Terminate thread and task if exception came from userspace. */ 116 void fault_if_from_uspace(istate_t *istate, c har *fmt, ...)116 void fault_if_from_uspace(istate_t *istate, const char *fmt, ...) 117 117 { 118 118 task_t *task = TASK; … … 162 162 #if (IVT_ITEMS > 0) 163 163 unsigned int i; 164 char *symbol;165 164 166 165 spinlock_lock(&exctbl_lock); … … 177 176 178 177 for (i = 0; i < IVT_ITEMS; i++) { 179 symbol = symtab_fmt_name_lookup((unative_t) exc_table[i].f);178 const char *symbol = symtab_fmt_name_lookup((unative_t) exc_table[i].f); 180 179 181 180 #ifdef __32_BITS__ -
kernel/generic/src/lib/elf.c
ra634485 ra000878c 48 48 #include <arch.h> 49 49 50 static c har *error_codes[] = {50 static const char *error_codes[] = { 51 51 "no error", 52 52 "invalid image", … … 137 137 * @return NULL terminated description of error. 138 138 */ 139 c har *elf_error(unsigned int rc)139 const char *elf_error(unsigned int rc) 140 140 { 141 141 ASSERT(rc < sizeof(error_codes) / sizeof(char *)); -
kernel/generic/src/main/kinit.c
ra634485 ra000878c 183 183 184 184 char namebuf[TASK_NAME_BUFLEN]; 185 char *name; 186 187 name = init.tasks[i].name; 185 186 const char *name = init.tasks[i].name; 188 187 if (name[0] == 0) 189 188 name = "<unknown>"; -
kernel/generic/src/main/version.c
ra634485 ra000878c 37 37 #include <macros.h> 38 38 39 char *project = "SPARTAN kernel";40 char *copyright = "Copyright (c) 2001-2009HelenOS project";41 char *release = STRING(RELEASE);42 char *name = STRING(NAME);43 char *arch = STRING(KARCH);39 static const char *project = "SPARTAN kernel"; 40 static const char *copyright = "Copyright (c) 2001-2010 HelenOS project"; 41 static const char *release = STRING(RELEASE); 42 static const char *name = STRING(NAME); 43 static const char *arch = STRING(KARCH); 44 44 45 45 #ifdef REVISION 46 char *revision = ", revision " STRING(REVISION);46 static const char *revision = ", revision " STRING(REVISION); 47 47 #else 48 char *revision = "";48 static const char *revision = ""; 49 49 #endif 50 50 51 51 #ifdef TIMESTAMP 52 char *timestamp = " on " STRING(TIMESTAMP);52 static const char *timestamp = " on " STRING(TIMESTAMP); 53 53 #else 54 char *timestamp = "";54 static const char *timestamp = ""; 55 55 #endif 56 56 -
kernel/generic/src/mm/slab.c
ra634485 ra000878c 130 130 /** Caches for malloc */ 131 131 static slab_cache_t *malloc_caches[SLAB_MAX_MALLOC_W - SLAB_MIN_MALLOC_W + 1]; 132 static c har *malloc_names[] = {132 static const char *malloc_names[] = { 133 133 "malloc-16", 134 134 "malloc-32", … … 571 571 572 572 /** Initialize allocated memory as a slab cache */ 573 static void 574 _slab_cache_create(slab_cache_t *cache, char *name, size_t size, size_t align, 575 int (*constructor)(void *obj, int kmflag), int (*destructor)(void *obj), 576 int flags) 573 static void _slab_cache_create(slab_cache_t *cache, const char *name, 574 size_t size, size_t align, int (*constructor)(void *obj, int kmflag), 575 int (*destructor)(void *obj), int flags) 577 576 { 578 577 int pages; … … 631 630 632 631 /** Create slab cache */ 633 slab_cache_t * 634 slab_cache_create(char *name, size_t size, size_t align, 632 slab_cache_t *slab_cache_create(const char *name, size_t size, size_t align, 635 633 int (*constructor)(void *obj, int kmflag), int (*destructor)(void *obj), 636 634 int flags) … … 853 851 cache = list_get_instance(cur, slab_cache_t, link); 854 852 855 c har *name = cache->name;853 const char *name = cache->name; 856 854 uint8_t order = cache->order; 857 855 size_t size = cache->size; … … 896 894 NULL, NULL, SLAB_CACHE_MAGDEFERRED); 897 895 } 898 #ifdef CONFIG_DEBUG 896 #ifdef CONFIG_DEBUG 899 897 _slab_initialized = 1; 900 898 #endif -
kernel/generic/src/proc/task.c
ra634485 ra000878c 171 171 * 172 172 */ 173 task_t *task_create(as_t *as, c har *name)173 task_t *task_create(as_t *as, const char *name) 174 174 { 175 175 ipl_t ipl; -
kernel/generic/src/proc/thread.c
ra634485 ra000878c 76 76 77 77 /** Thread states */ 78 c har *thread_states[] = {78 const char *thread_states[] = { 79 79 "Invalid", 80 80 "Running", … … 288 288 */ 289 289 thread_t *thread_create(void (* func)(void *), void *arg, task_t *task, 290 int flags, c har *name, bool uncounted)290 int flags, const char *name, bool uncounted) 291 291 { 292 292 thread_t *t; -
kernel/generic/src/synch/spinlock.c
ra634485 ra000878c 52 52 * 53 53 */ 54 void spinlock_initialize(spinlock_t *lock, c har *name)54 void spinlock_initialize(spinlock_t *lock, const char *name) 55 55 { 56 56 atomic_set(&lock->val, 0); -
kernel/generic/src/sysinfo/sysinfo.c
ra634485 ra000878c 225 225 int i; 226 226 unative_t val = 0; 227 c har *vtype = NULL;227 const char *vtype = NULL; 228 228 229 229
Note:
See TracChangeset
for help on using the changeset viewer.
