mirror of
https://github.com/drasko/codezero.git
synced 2026-01-13 11:23:16 +01:00
We moved initial list of a pager's caps from ktcb to task's space since the task is expected to trust its space. Most references to task->cap_list had to change. Although a single cap list only tells part of the story about the task's caps, the TASK_CAP_LIST macro works for us to get the first private set of caps that a task has.
28 lines
590 B
C
28 lines
590 B
C
|
|
#include <l4lib/arch/syscalls.h>
|
|
#include <l4lib/arch/syslib.h>
|
|
#include <l4lib/ipcdefs.h>
|
|
#include <unistd.h>
|
|
#include <l4/macros.h>
|
|
#include <libposix.h>
|
|
|
|
static inline void __attribute__ ((noreturn)) l4_exit_ipc(int status)
|
|
{
|
|
int ret;
|
|
|
|
write_mr(L4SYS_ARG0, status);
|
|
|
|
/* Call pager with exit() request and block on its receive phase */
|
|
ret = l4_sendrecv(pagerid, pagerid, L4_IPC_TAG_EXIT);
|
|
|
|
/* This call should not fail or return */
|
|
print_err("%s: L4 IPC returned: %d.\n", __FUNCTION__, ret);
|
|
BUG();
|
|
}
|
|
|
|
void __attribute__ ((noreturn)) _exit(int status)
|
|
{
|
|
l4_exit_ipc(status);
|
|
}
|
|
|