Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/include Reinstate some const qualifiers I accid...
details: https://anonhg.NetBSD.org/src/rev/03c955bcd22d
branches: trunk
changeset: 543555:03c955bcd22d
user: fvdl <fvdl%NetBSD.org@localhost>
date: Thu Feb 27 11:22:46 2003 +0000
description:
Reinstate some const qualifiers I accidentally removed when moving this
file.
diffstat:
sys/arch/x86/include/pio.h | 47 ++++++++++++++++++++++++---------------------
1 files changed, 25 insertions(+), 22 deletions(-)
diffs (174 lines):
diff -r 576428a3a701 -r 03c955bcd22d sys/arch/x86/include/pio.h
--- a/sys/arch/x86/include/pio.h Thu Feb 27 11:09:59 2003 +0000
+++ b/sys/arch/x86/include/pio.h Thu Feb 27 11:22:46 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pio.h,v 1.1 2003/02/26 21:26:11 fvdl Exp $ */
+/* $NetBSD: pio.h,v 1.2 2003/02/27 11:22:46 fvdl Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
(/* CONSTCOND */ __use_immediate_port(port) ? __inbc(port) : __inb(port))
static __inline u_int8_t
-__inbc(int port)
+__inbc(unsigned port)
{
u_int8_t data;
__asm __volatile("inb %w1,%0" : "=a" (data) : "id" (port));
@@ -72,7 +72,7 @@
}
static __inline u_int8_t
-__inb(int port)
+__inb(unsigned port)
{
u_int8_t data;
__asm __volatile("inb %w1,%0" : "=a" (data) : "d" (port));
@@ -80,7 +80,7 @@
}
static __inline void
-insb(int port, void *addr, int cnt)
+insb(unsigned port, void *addr, int cnt)
{
void *dummy1;
int dummy2;
@@ -94,7 +94,7 @@
(/* CONSTCOND */ __use_immediate_port(port) ? __inwc(port) : __inw(port))
static __inline u_int16_t
-__inwc(int port)
+__inwc(unsigned port)
{
u_int16_t data;
__asm __volatile("inw %w1,%0" : "=a" (data) : "id" (port));
@@ -102,7 +102,7 @@
}
static __inline u_int16_t
-__inw(int port)
+__inw(unsigned port)
{
u_int16_t data;
__asm __volatile("inw %w1,%0" : "=a" (data) : "d" (port));
@@ -110,7 +110,7 @@
}
static __inline void
-insw(int port, void *addr, int cnt)
+insw(unsigned port, void *addr, int cnt)
{
void *dummy1;
int dummy2;
@@ -124,7 +124,7 @@
(/* CONSTCOND */ __use_immediate_port(port) ? __inlc(port) : __inl(port))
static __inline u_int32_t
-__inlc(int port)
+__inlc(unsigned port)
{
u_int32_t data;
__asm __volatile("inl %w1,%0" : "=a" (data) : "id" (port));
@@ -132,7 +132,7 @@
}
static __inline u_int32_t
-__inl(int port)
+__inl(unsigned port)
{
u_int32_t data;
__asm __volatile("inl %w1,%0" : "=a" (data) : "d" (port));
@@ -140,7 +140,7 @@
}
static __inline void
-insl(int port, void *addr, int cnt)
+insl(unsigned port, void *addr, int cnt)
{
void *dummy1;
int dummy2;
@@ -151,22 +151,23 @@
}
#define outb(port, data) \
- (/* CONSTCOND */__use_immediate_port(port) ? __outbc(port, data) : __outb(port, data))
+ (/* CONSTCOND */__use_immediate_port(port) ? __outbc(port, data) : \
+ __outb(port, data))
static __inline void
-__outbc(int port, u_int8_t data)
+__outbc(unsigned port, u_int8_t data)
{
__asm __volatile("outb %0,%w1" : : "a" (data), "id" (port));
}
static __inline void
-__outb(int port, u_int8_t data)
+__outb(unsigned port, u_int8_t data)
{
__asm __volatile("outb %0,%w1" : : "a" (data), "d" (port));
}
static __inline void
-outsb(int port, void *addr, int cnt)
+outsb(unsigned port, const void *addr, int cnt)
{
void *dummy1;
int dummy2;
@@ -176,22 +177,23 @@
}
#define outw(port, data) \
- (/* CONSTCOND */ __use_immediate_port(port) ? __outwc(port, data) : __outw(port, data))
+ (/* CONSTCOND */ __use_immediate_port(port) ? __outwc(port, data) : \
+ __outw(port, data))
static __inline void
-__outwc(int port, u_int16_t data)
+__outwc(unsigned port, u_int16_t data)
{
__asm __volatile("outw %0,%w1" : : "a" (data), "id" (port));
}
static __inline void
-__outw(int port, u_int16_t data)
+__outw(unsigned port, u_int16_t data)
{
__asm __volatile("outw %0,%w1" : : "a" (data), "d" (port));
}
static __inline void
-outsw(int port, void *addr, int cnt)
+outsw(unsigned port, const void *addr, int cnt)
{
void *dummy1;
int dummy2;
@@ -201,22 +203,23 @@
}
#define outl(port, data) \
- (/* CONSTCOND */ __use_immediate_port(port) ? __outlc(port, data) : __outl(port, data))
+ (/* CONSTCOND */ __use_immediate_port(port) ? __outlc(port, data) : \
+ __outl(port, data))
static __inline void
-__outlc(int port, u_int32_t data)
+__outlc(unsigned port, u_int32_t data)
{
__asm __volatile("outl %0,%w1" : : "a" (data), "id" (port));
}
static __inline void
-__outl(int port, u_int32_t data)
+__outl(unsigned port, u_int32_t data)
{
__asm __volatile("outl %0,%w1" : : "a" (data), "d" (port));
}
static __inline void
-outsl(int port, void *addr, int cnt)
+outsl(unsigned port, const void *addr, int cnt)
{
void *dummy1;
int dummy2;
Home |
Main Index |
Thread Index |
Old Index