aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2014-10-31 17:43:21 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2014-10-31 17:43:21 +0000
commit2361c6d135f4c5ebef91f0502ed51c45fddef7c1 (patch)
treeca4f17ebca2b54f7d57e40ce18223d7fda145c25 /share
parent3a4c61c2fddb460ae25a243fb3d029562b5e5538 (diff)
downloadsrc-2361c6d135f4c5ebef91f0502ed51c45fddef7c1.tar.gz
src-2361c6d135f4c5ebef91f0502ed51c45fddef7c1.zip
Add type qualifier volatile to the base (userspace) address argument
of fuword(9) and suword(9). This makes the functions type-compatible with volatile objects and does not require devolatile force, e.g. in kern_umtx.c. Requested by: bde Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
Notes
Notes: svn path=/head/; revision=273911
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/fetch.918
-rw-r--r--share/man/man9/store.914
2 files changed, 17 insertions, 15 deletions
diff --git a/share/man/man9/fetch.9 b/share/man/man9/fetch.9
index 7e13cbc51c45..1d46784ed310 100644
--- a/share/man/man9/fetch.9
+++ b/share/man/man9/fetch.9
@@ -34,7 +34,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 21, 2014
+.Dd October 29, 2014
.Dt FETCH 9
.Os
.Sh NAME
@@ -53,21 +53,21 @@
.In sys/types.h
.In sys/systm.h
.Ft int
-.Fn fubyte "const void *base"
+.Fn fubyte "volatile const void *base"
.Ft long
-.Fn fuword "const void *base"
+.Fn fuword "volatile const void *base"
.Ft int
-.Fn fuword16 "void *base"
+.Fn fuword16 "volatile const void *base"
.Ft int32_t
-.Fn fuword32 "const void *base"
+.Fn fuword32 "volatile const void *base"
.Ft int64_t
-.Fn fuword64 "const void *base"
+.Fn fuword64 "volatile const void *base"
.Ft long
-.Fn fueword "const void *base" "long *val"
+.Fn fueword "volatile const void *base" "long *val"
.Ft int32_t
-.Fn fueword32 "const void *base" "int32_t *val"
+.Fn fueword32 "volatile const void *base" "int32_t *val"
.Ft int64_t
-.Fn fueword64 "const void *base" "int64_t *val"
+.Fn fueword64 "volatile const void *base" "int64_t *val"
.In sys/resourcevar.h
.Ft int
.Fn fuswintr "void *base"
diff --git a/share/man/man9/store.9 b/share/man/man9/store.9
index d333eff03315..cc442f25f47c 100644
--- a/share/man/man9/store.9
+++ b/share/man/man9/store.9
@@ -34,7 +34,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 5, 2009
+.Dd October 29, 2014
.Dt STORE 9
.Os
.Sh NAME
@@ -48,15 +48,15 @@
.In sys/time.h
.In sys/systm.h
.Ft int
-.Fn subyte "void *base" "int byte"
+.Fn subyte "volatile void *base" "int byte"
.Ft int
-.Fn suword "void *base" "long word"
+.Fn suword "volatile void *base" "long word"
.Ft int
-.Fn suword16 "void *base" "int word"
+.Fn suword16 "volatile void *base" "int word"
.Ft int
-.Fn suword32 "void *base" "int32_t word"
+.Fn suword32 "volatile void *base" "int32_t word"
.Ft int
-.Fn suword64 "void *base" "int64_t word"
+.Fn suword64 "volatile void *base" "int64_t word"
.In sys/resourcevar.h
.Ft int
.Fn suswintr "void *base" "int word"
@@ -64,6 +64,8 @@
The
.Nm
functions are designed to copy small amounts of data to user-space.
+If write is successful, it is performed atomically.
+The data written must be naturally aligned.
.Pp
The
.Nm