BSD 4_3 release
[unix-history] / usr / src / lib / libc / vax / sys / brk.c
CommitLineData
cd2c584c
DF
1/*
2 * Copyright (c) 1983 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 */
6
42217b17 7#ifdef SYSLIBC_SCCS
95f51977 8_sccsid:.asciz "@(#)brk.c 5.3 (Berkeley) 3/9/86"
42217b17 9#endif SYSLIBC_SCCS
e2a0e449
KM
10
11#include "SYS.h"
12
13#define SYS_brk 17
14
15 .globl curbrk
dc09cd7b 16 .globl minbrk
b1ae656c
KL
17ENTRY(_brk)
18 jbr ok
e2a0e449 19
dc09cd7b
KM
20ENTRY(brk)
21 cmpl 4(ap),minbrk
22 bgeq ok
23 movl minbrk,4(ap)
24ok:
25 chmk $SYS_brk
26 jcs err
e2a0e449
KM
27 movl 4(ap),curbrk
28 clrl r0
29 ret
dc09cd7b
KM
30err:
31 jmp cerror