Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/sys - detail protections.
details: https://anonhg.NetBSD.org/src/rev/1cd6596ce2bd
branches: trunk
changeset: 535181:1cd6596ce2bd
user: yamt <yamt%NetBSD.org@localhost>
date: Sun Aug 11 14:36:33 2002 +0000
description:
- detail protections.
- add RETURN VALUES section.
from OpenBSD.
diffstat:
lib/libc/sys/mprotect.2 | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diffs (39 lines):
diff -r abeea4485d97 -r 1cd6596ce2bd lib/libc/sys/mprotect.2
--- a/lib/libc/sys/mprotect.2 Sun Aug 11 13:50:45 2002 +0000
+++ b/lib/libc/sys/mprotect.2 Sun Aug 11 14:36:33 2002 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: mprotect.2,v 1.12 2002/02/08 01:28:19 ross Exp $
+.\" $NetBSD: mprotect.2,v 1.13 2002/08/11 14:36:33 yamt Exp $
.\"
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -53,6 +53,29 @@
.Fa prot .
Not all implementations will guarantee protection on a page basis;
the granularity of protection changes may be as large as an entire region.
+.Pp
+The protections (region accessibility) are specified in the
+.Fa prot
+argument by
+.Tn OR Ns 'ing
+the following values:
+.Pp
+.Bl -tag -width MAP_FIXEDX
+.It Dv PROT_EXEC
+Pages may be executed.
+.It Dv PROT_READ
+Pages may be read.
+.It Dv PROT_WRITE
+Pages may be written.
+.It Dv PROT_NONE
+No permissions.
+.El
+.Sh RETURN VALUES
+Upon successful completion,
+a value of 0 is returned.
+Otherwise, a value of \-1 is returned and
+.Va errno
+is set to indicate the error.
.Sh SEE ALSO
.Xr madvise 2 ,
.Xr mincore 2 ,
Home |
Main Index |
Thread Index |
Old Index