diff options
author | 2014-10-22 23:56:47 +0000 | |
---|---|---|
committer | 2014-10-22 23:56:47 +0000 | |
commit | b5b8c50f23acda0eb8bd12f6f48c662adf81ad72 (patch) | |
tree | 601d0024683835df06c221600fc674203f5f86ad | |
parent | make the description of the syntax of function lists agree (diff) | |
download | wireguard-openbsd-b5b8c50f23acda0eb8bd12f6f48c662adf81ad72.tar.xz wireguard-openbsd-b5b8c50f23acda0eb8bd12f6f48c662adf81ad72.zip |
make [bl]emtoh{16,32,64} take volatile const foo *, not volatile foo *
while in the manpage add volatile where the code has it too.
ok miod@ guenther@
-rw-r--r-- | share/man/man9/bemtoh32.9 | 28 | ||||
-rw-r--r-- | sys/arch/powerpc/include/endian.h | 8 | ||||
-rw-r--r-- | sys/arch/sparc64/include/endian.h | 8 |
3 files changed, 22 insertions, 22 deletions
diff --git a/share/man/man9/bemtoh32.9 b/share/man/man9/bemtoh32.9 index 74d489a8b5a..04ec84db618 100644 --- a/share/man/man9/bemtoh32.9 +++ b/share/man/man9/bemtoh32.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: bemtoh32.9,v 1.4 2014/03/14 11:53:35 jmc Exp $ +.\" $OpenBSD: bemtoh32.9,v 1.5 2014/10/22 23:56:47 dlg Exp $ .\" .\" Copyright (c) 2014 David Gwynne <dlg@openbsd.org> .\" All rights reserved. @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 14 2014 $ +.Dd $Mdocdate: October 22 2014 $ .Dt BEMTOH32 9 .Os .Sh NAME @@ -35,29 +35,29 @@ .Sh SYNOPSIS .In sys/types.h .Ft uint16_t -.Fn bemtoh16 "uint16_t *m" +.Fn bemtoh16 "volatile const uint16_t *m" .Ft uint32_t -.Fn bemtoh32 "uint32_t *m" +.Fn bemtoh32 "volatile const uint32_t *m" .Ft uint64_t -.Fn bemtoh64 "uint64_t *m" +.Fn bemtoh64 "volatile const uint64_t *m" .Ft uint16_t -.Fn lemtoh16 "uint16_t *m" +.Fn lemtoh16 "volatile const uint16_t *m" .Ft uint32_t -.Fn lemtoh32 "uint32_t *m" +.Fn lemtoh32 "volatile const uint32_t *m" .Ft uint64_t -.Fn lemtoh64 "uint64_t *m" +.Fn lemtoh64 "volatile const uint64_t *m" .Ft void -.Fn htobem16 "uint16_t *m" "uint16_t v" +.Fn htobem16 "volatile uint16_t *m" "uint16_t v" .Ft void -.Fn htobem32 "uint32_t *m" "uint32_t v" +.Fn htobem32 "volatile uint32_t *m" "uint32_t v" .Ft void -.Fn htobem64 "uint64_t *m" "uint64_t v" +.Fn htobem64 "volatile uint64_t *m" "uint64_t v" .Ft void -.Fn htolem16 "uint16_t *m" "uint16_t v" +.Fn htolem16 "volatile uint16_t *m" "uint16_t v" .Ft void -.Fn htolem32 "uint32_t *m" "uint32_t v" +.Fn htolem32 "volatile uint32_t *m" "uint32_t v" .Ft void -.Fn htolem64 "uint64_t *m" "uint64_t v" +.Fn htolem64 "volatile uint64_t *m" "uint64_t v" .Sh DESCRIPTION This API provides a way to take advantage of an architecture's ability to load and store words in memory of different endians. diff --git a/sys/arch/powerpc/include/endian.h b/sys/arch/powerpc/include/endian.h index d8e4c5eb38c..11ce8200c8c 100644 --- a/sys/arch/powerpc/include/endian.h +++ b/sys/arch/powerpc/include/endian.h @@ -1,4 +1,4 @@ -/* $OpenBSD: endian.h,v 1.20 2014/07/12 16:25:09 guenther Exp $ */ +/* $OpenBSD: endian.h,v 1.21 2014/10/22 23:56:47 dlg Exp $ */ /*- * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. @@ -30,7 +30,7 @@ #ifdef _KERNEL static inline __uint16_t -__mswap16(volatile __uint16_t *m) +__mswap16(volatile const __uint16_t *m) { __uint16_t v; @@ -42,7 +42,7 @@ __mswap16(volatile __uint16_t *m) } static inline __uint32_t -__mswap32(volatile __uint32_t *m) +__mswap32(volatile const __uint32_t *m) { __uint32_t v; @@ -54,7 +54,7 @@ __mswap32(volatile __uint32_t *m) } static inline __uint64_t -__mswap64(volatile __uint64_t *m) +__mswap64(volatile const __uint64_t *m) { __uint32_t *a = (__uint32_t *)m; __uint64_t v; diff --git a/sys/arch/sparc64/include/endian.h b/sys/arch/sparc64/include/endian.h index b2bb346d4ed..72b3e4928da 100644 --- a/sys/arch/sparc64/include/endian.h +++ b/sys/arch/sparc64/include/endian.h @@ -1,4 +1,4 @@ -/* $OpenBSD: endian.h,v 1.6 2014/07/12 16:25:09 guenther Exp $ */ +/* $OpenBSD: endian.h,v 1.7 2014/10/22 23:56:47 dlg Exp $ */ #ifndef _MACHINE_ENDIAN_H_ #define _MACHINE_ENDIAN_H_ @@ -10,7 +10,7 @@ #define __ASI_P_L 0x88 /* == ASI_PRIMARY_LITTLE */ static inline __uint16_t -__mswap16(volatile __uint16_t *m) +__mswap16(volatile const __uint16_t *m) { __uint16_t v; @@ -22,7 +22,7 @@ __mswap16(volatile __uint16_t *m) } static inline __uint32_t -__mswap32(volatile __uint32_t *m) +__mswap32(volatile const __uint32_t *m) { __uint32_t v; @@ -34,7 +34,7 @@ __mswap32(volatile __uint32_t *m) } static inline __uint64_t -__mswap64(volatile __uint64_t *m) +__mswap64(volatile const __uint64_t *m) { __uint64_t v; |