minix/servers/pm/break.c
2012-03-25 21:58:14 +02:00

20 lines
482 B
C

#include "pm.h"
#include "param.h"
#include "glo.h"
#include "mproc.h"
#include <minix/vm.h>
/*===========================================================================*
* do_brk *
*===========================================================================*/
int do_brk()
{
int r;
/* Entry point to brk(addr) system call. */
r = vm_brk(mp->mp_endpoint, m_in.PMBRK_ADDR);
mp->mp_reply.reply_ptr = (r == OK ? m_in.PMBRK_ADDR : (char *) -1);
return r;
}