$(LIBSYS)(sys_eniop.o) \
$(LIBSYS)(sys_segctl.o) \
$(LIBSYS)(sys_umap.o) \
- $(LIBSYS)(sys_exit.o) \
$(LIBSYS)(sys_physcp.o) \
$(LIBSYS)(sys_vircp.o) \
$(LIBSYS)(sys_in.o) \
$(LIBSYS)(sys_umap.o): sys_umap.c
$(CC1) sys_umap.c
-$(LIBSYS)(sys_exit.o): sys_exit.c
- $(CC1) sys_exit.c
-
$(LIBSYS)(sys_getsig.o): sys_getsig.c
$(CC1) sys_getsig.c
+++ /dev/null
-#include "syslib.h"
-
-/*===========================================================================*
- * sys_exit *
- *===========================================================================*/
-PUBLIC int sys_exit(int status)
-{
-/* A server wants to exit. The exit status is passed on, possibly a panic.
- */
- message m;
- m.EXIT_STATUS = status;
- return(_taskcall(SYSTASK, SYS_EXIT, &m));
- /* NOT REACHED */
-}
-
/*===========================================================================*
* sys_xit *
*===========================================================================*/
-PUBLIC int sys_xit(parent, proc)
-int parent; /* parent of exiting process */
+PUBLIC int sys_xit(proc)
int proc; /* which process has exited */
{
-/* A process has exited. Tell the kernel. */
-
+/* A process has exited. PM tells the kernel. In addition this call can be
+ * used by system processes to directly exit without passing through the
+ * PM. This should be used with care to prevent inconsistent PM tables.
+ */
message m;
- m.PR_PPROC_NR = parent;
m.PR_PROC_NR = proc;
return(_taskcall(SYSTASK, SYS_XIT, &m));
}
}
}
- m.m_type = SYS_EXIT;
- m.EXIT_STATUS = 1;
- _taskcall(SYSTASK, SYS_EXIT, &m);
+ m.m_type = SYS_XIT;
+ m.PR_PROC_NR = SELF;
+ _taskcall(SYSTASK, SYS_XIT, &m);
/* never reached */
}