/branches/dynload/kernel/generic/include/mm/as.h |
---|
304,6 → 304,7 |
* This flags is passed when running the loader, otherwise elf_load() |
* would return with a EE_LOADER error code. |
*/ |
#define ELD_F_NONE 0 |
#define ELD_F_LOADER 1 |
extern unsigned int elf_load(elf_header_t *header, as_t *as, int flags); |
/branches/dynload/kernel/generic/include/syscall/syscall.h |
---|
44,6 → 44,7 |
SYS_THREAD_GET_ID, |
SYS_TASK_GET_ID, |
SYS_TASK_SPAWN, |
SYS_TASK_SPAWN_LOADER, |
SYS_FUTEX_SLEEP, |
/branches/dynload/kernel/generic/src/proc/task.c |
---|
249,7 → 249,7 |
* |
* @return Task of the running program or NULL on error. |
*/ |
task_t *task_create_from_as(as_t *as, uintptr_t entry_addr, char *name |
task_t *task_create_from_as(as_t *as, uintptr_t entry_addr, char *name, |
thread_t **thr) |
{ |
as_area_t *a; |
310,7 → 310,7 |
rc = elf_load((elf_header_t *) program_addr, as, 0); |
if (rc != EE_OK) { |
as_destroy(as); |
*task = NULL; |
*t = NULL; |
if (rc != EE_LOADER) |
return ENOTSUP; |
338,6 → 338,7 |
as_t *as; |
unsigned int rc; |
void *loader; |
thread_t *thr; |
as = as_create(0); |
ASSERT(as); |
352,7 → 353,7 |
} |
*t = task_create_from_as( |
as, ((elf_header_t *) program_loader)->e_entry, name); |
as, ((elf_header_t *) program_loader)->e_entry, name, &thr); |
return EOK; |
} |
467,7 → 468,7 |
return ENOMEM; |
} |
unsigned int erc = elf_load((elf_header_t *) kimage, as); |
unsigned int erc = elf_load((elf_header_t *) kimage, as, ELD_F_NONE); |
if (erc != EE_OK) { |
as_destroy(as); |
free(kernel_uarg); |
/branches/dynload/kernel/generic/src/proc/thread.c |
---|
706,7 → 706,7 |
return NULL; |
} |
rc = elf_load((elf_header_t *) program_addr, as); |
rc = elf_load((elf_header_t *) program_addr, as, ELD_F_NONE); |
if (rc != EE_OK) { |
free(kernel_uarg); |
as_destroy(as); |
/branches/dynload/kernel/generic/src/syscall/syscall.c |
---|
93,7 → 93,7 |
/** Print a hex integer into klog */ |
static unative_t sys_debug_putint(unative_t i) |
{ |
klog_printf("[task:0x%x]", i); |
printf("[task:0x%x]", i); |
return 0; |
} |
/branches/dynload/kernel/generic/src/ipc/ipc.c |
---|
573,7 → 573,7 |
spinlock_lock(&task->answerbox.lock); |
printf("ABOX - CALLS:\n"); |
for (tmp = task->answerbox.calls.next; tmp != &task->answerbox.calls; |
tmp = tmp->next) { |
tmp = tmp->next) { |
call = list_get_instance(tmp, call_t, link); |
printf("Callid: %p Srctask:%" PRIu64 " M:%" PRIun |
" A1:%" PRIun " A2:%" PRIun " A3:%" PRIun |
586,8 → 586,8 |
/* Print answerbox - calls */ |
printf("ABOX - DISPATCHED CALLS:\n"); |
for (tmp = task->answerbox.dispatched_calls.next; |
tmp != &task->answerbox.dispatched_calls; |
tmp = tmp->next) { |
tmp != &task->answerbox.dispatched_calls; |
tmp = tmp->next) { |
call = list_get_instance(tmp, call_t, link); |
printf("Callid: %p Srctask:%" PRIu64 " M:%" PRIun |
" A1:%" PRIun " A2:%" PRIun " A3:%" PRIun |
600,7 → 600,7 |
/* Print answerbox - calls */ |
printf("ABOX - ANSWERS:\n"); |
for (tmp = task->answerbox.answers.next; tmp != &task->answerbox.answers; |
tmp = tmp->next) { |
tmp = tmp->next) { |
call = list_get_instance(tmp, call_t, link); |
printf("Callid:%p M:%" PRIun " A1:%" PRIun " A2:%" PRIun |
" A3:%" PRIun " A4:%" PRIun " A5:%" PRIun " Flags:%x\n", |