53,7 → 53,6 |
#include <loader/pcb.h> |
|
#include "elf.h" |
#include "arch/pcb.h" |
#include "elf_load.h" |
#include "arch.h" |
|
118,7 → 117,7 |
* |
* @param info Info structure filled earlier by elf_load_file() |
*/ |
void elf_run(elf_info_t *info, void *pcb) |
void elf_run(elf_info_t *info, pcb_t *pcb) |
{ |
program_run(info->entry, pcb); |
|
127,29 → 126,16 |
|
/** Create the program control block (PCB). |
* |
* Create and install the program control block, initialising it |
* with program information from @a info. |
* Fills the program control block @a pcb with information from |
* @a info. |
* |
* @param info Program info structure |
* @return EOK on success or negative error code |
*/ |
int elf_create_pcb(elf_info_t *info) |
void elf_create_pcb(elf_info_t *info, pcb_t *pcb) |
{ |
pcb_t *pcb; |
void *a; |
|
pcb = __pcb_get(); |
|
a = as_area_create(pcb, sizeof(pcb_t), AS_AREA_READ | AS_AREA_WRITE); |
if (a == (void *)(-1)) { |
printf("elf_create_pcb: memory mapping failed\n"); |
return EE_MEMORY; |
} |
|
pcb->entry = info->entry; |
pcb->dynamic = info->dynamic; |
|
return 0; |
} |
|
|