xref: /csrg-svn/lib/libc/tahoe/sys/brk.s (revision 29444)
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
7#ifdef SYSLIBC_SCCS
8_sccsid:.asciz	"@(#)brk.s	5.1 (Berkeley) 07/02/86"
9#endif SYSLIBC_SCCS
10
11#include "SYS.h"
12
13#define	SYS_brk		17
14
15	.globl	curbrk
16	.globl	minbrk
17
18ENTRY(brk)
19	cmpl	4(fp),minbrk
20	bgeq	ok
21	movl	minbrk,4(fp)
22ok:
23	kcall	$SYS_brk
24	jcs	err
25	movl	4(fp),curbrk
26	clrl	r0
27	ret
28err:
29	jmp	cerror
30