lib: launch: implement passing args and environment variables to new tasks

This commit is contained in:
2026-03-06 20:16:51 +00:00
parent a6a2526502
commit c4fd252f86
6 changed files with 186 additions and 8 deletions

26
lib/liblaunch/stack.h Normal file
View File

@@ -0,0 +1,26 @@
#ifndef LIBLAUNCH_STACK_H_
#define LIBLAUNCH_STACK_H_
#include <mango/types.h>
struct stack_writer {
virt_addr_t w_local_sp;
virt_addr_t w_remote_sp;
};
extern void stack_writer_init(
struct stack_writer *w,
virt_addr_t local_sp,
virt_addr_t remote_sp);
extern void *stack_writer_put_string(
struct stack_writer *w,
const char *s,
virt_addr_t *out_remote);
extern void *stack_writer_put(
struct stack_writer *w,
const void *p,
size_t len,
virt_addr_t *out_remote);
#endif