summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-12-16 21:06:51 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2015-12-16 21:06:51 +0100
commit7be7d0681f567e97fd37f937c2e5e486d6d74eab (patch)
treef2b41bb97b678b45034f6321c3b1524e8cf61ef6
parentafe450d3810ed0f66cff46fe0fe0e70520d2c14b (diff)
kernel: use uintptr for ibrk() return value (for base >2GB) and clarify segbrk(2)
-rw-r--r--sys/man/2/segbrk11
-rw-r--r--sys/src/9/port/segment.c2
2 files changed, 3 insertions, 10 deletions
diff --git a/sys/man/2/segbrk b/sys/man/2/segbrk
index 9cdb18f0b..f20838e36 100644
--- a/sys/man/2/segbrk
+++ b/sys/man/2/segbrk
@@ -24,8 +24,8 @@ A call to
.I segbrk
with a zero
.I addr
-argument returns the address
-of the top of bss.
+argument returns the base address of the segment without
+altering its size.
.PP
The system will prevent segments from overlapping and will not allow the
length of the
@@ -46,13 +46,6 @@ returns
.B (void*)-1
on error.
.SH BUGS
-.I Segbrk
-is not fully defined or implemented.
-In particular,
-it cannot always return the top of bss
-when called with a zero
-.I addr
-argument.
The
.I segbrk
system call may go away or be re-implemented
diff --git a/sys/src/9/port/segment.c b/sys/src/9/port/segment.c
index a9eb26eaf..e9e8959df 100644
--- a/sys/src/9/port/segment.c
+++ b/sys/src/9/port/segment.c
@@ -376,7 +376,7 @@ putimage(Image *i)
ccloseq(c); /* does not block */
}
-long
+uintptr
ibrk(uintptr addr, int seg)
{
Segment *s, *ns;