Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/include/asm Add get_unaligned_le16, pu...



details:   https://anonhg.NetBSD.org/src/rev/1cb658f6a75e
branches:  trunk
changeset: 336320:1cb658f6a75e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Feb 25 15:01:03 2015 +0000

description:
Add get_unaligned_le16, put_unaligned_le16.

diffstat:

 sys/external/bsd/drm2/include/asm/unaligned.h |  16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diffs (30 lines):

diff -r f733053e1a34 -r 1cb658f6a75e sys/external/bsd/drm2/include/asm/unaligned.h
--- a/sys/external/bsd/drm2/include/asm/unaligned.h     Wed Feb 25 14:57:04 2015 +0000
+++ b/sys/external/bsd/drm2/include/asm/unaligned.h     Wed Feb 25 15:01:03 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: unaligned.h,v 1.2 2015/02/25 14:36:58 riastradh Exp $  */
+/*     $NetBSD: unaligned.h,v 1.3 2015/02/25 15:01:03 riastradh Exp $  */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -34,6 +34,20 @@
 
 #include <sys/endian.h>
 
+static inline uint16_t
+get_unaligned_le16(const void *p)
+{
+
+       return le16dec(p);
+}
+
+static inline void
+put_unaligned_le16(uint16_t v, void *p)
+{
+
+       return le16enc(p, v);
+}
+
 static inline uint32_t
 get_unaligned_le32(const void *p)
 {



Home | Main Index | Thread Index | Old Index