#include <syscall.h>
#include <proc.h>
#include <thread.h>
#include <addrspace.h>

void sys__exit(int status) {
  (void)status;
  /* delete current process as */
  struct addrspace *as = proc_getas();
  as_destroy(as);
  /* exit thread */
  thread_exit();

  panic("sys__exit end reached!!\n");
}
