Changeset ebb1489 in mainline for kernel/generic/src/proc/program.c


Ignore:
Timestamp:
2024-10-13T08:23:40Z (2 months ago)
Author:
GitHub <noreply@…>
Children:
0472cf17
Parents:
2a0c827c (diff), b3b79981 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
boba-buba <120932204+boba-buba@…> (2024-10-13 08:23:40)
git-committer:
GitHub <noreply@…> (2024-10-13 08:23:40)
Message:

Merge branch 'HelenOS:master' into topic/packet-capture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/proc/program.c

    r2a0c827c rebb1489  
    5353#include <syscall/copy.h>
    5454#include <proc/program.h>
     55#include <userspace.h>
    5556
    5657/**
     
    7273errno_t program_create(as_t *as, uspace_addr_t entry_addr, char *name, program_t *prg)
    7374{
    74         uspace_arg_t *kernel_uarg = (uspace_arg_t *)
    75             malloc(sizeof(uspace_arg_t));
     75        uinit_arg_t *kernel_uarg = malloc(sizeof(uinit_arg_t));
    7676        if (!kernel_uarg)
    7777                return ENOMEM;
     
    104104        }
    105105
    106         kernel_uarg->uspace_entry = entry_addr;
    107         kernel_uarg->uspace_stack = virt;
    108         kernel_uarg->uspace_stack_size = STACK_SIZE_USER;
    109         kernel_uarg->uspace_thread_function = USPACE_NULL;
    110         kernel_uarg->uspace_thread_arg = USPACE_NULL;
    111         kernel_uarg->uspace_uarg = USPACE_NULL;
     106        kernel_uarg->pc = entry_addr;
     107        kernel_uarg->sp = arch_get_initial_sp(virt, STACK_SIZE_USER);
    112108
    113109        /*
Note: See TracChangeset for help on using the changeset viewer.