2005-05-03 17:35:52 +02:00
|
|
|
|
2005-05-13 10:57:08 +02:00
|
|
|
#include "pm.h"
|
2005-05-03 17:35:52 +02:00
|
|
|
#include "param.h"
|
2008-11-19 13:26:10 +01:00
|
|
|
#include "glo.h"
|
|
|
|
#include "mproc.h"
|
2005-05-03 17:35:52 +02:00
|
|
|
|
2008-11-19 13:26:10 +01:00
|
|
|
#include <minix/vm.h>
|
2005-05-03 17:35:52 +02:00
|
|
|
|
|
|
|
/*===========================================================================*
|
2006-05-11 16:57:23 +02:00
|
|
|
* do_brk *
|
2005-05-03 17:35:52 +02:00
|
|
|
*===========================================================================*/
|
|
|
|
PUBLIC int do_brk()
|
|
|
|
{
|
2006-06-30 16:35:38 +02:00
|
|
|
int r;
|
2008-11-19 13:26:10 +01:00
|
|
|
/* Entry point to brk(addr) system call. */
|
|
|
|
r = vm_brk(mp->mp_endpoint, m_in.addr);
|
2006-06-30 16:35:38 +02:00
|
|
|
mp->mp_reply.reply_ptr = (r == OK ? m_in.addr : (char *) -1);
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|