2013-05-08 23:56:10 +00:00
|
|
|
/* $Source: /cvsroot/tack/Ack/plat/linux386/libsys/brk.c,v $
|
|
|
|
* $State: Exp $
|
|
|
|
* $Revision: 1.1 $
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
2013-05-18 12:00:37 +00:00
|
|
|
#include <errno.h>
|
2013-05-08 23:56:10 +00:00
|
|
|
#include "libsys.h"
|
|
|
|
|
|
|
|
int brk(void* end)
|
|
|
|
{
|
2013-05-18 12:00:37 +00:00
|
|
|
int e = _syscall(__NR_brk, (quad) end, 0, 0);
|
|
|
|
if (e == -1)
|
|
|
|
errno = ENOMEM;
|
|
|
|
return e;
|
2013-05-08 23:56:10 +00:00
|
|
|
}
|