From 955ab223bdf558fe308e41ef281c66a0d643acdc Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 29 Aug 2004 19:17:21 +0000 Subject: [PATCH] Formatting. --- src/threads/io.h | 62 ++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/threads/io.h b/src/threads/io.h index f59c79e..ed9f55f 100644 --- a/src/threads/io.h +++ b/src/threads/io.h @@ -1,11 +1,11 @@ -#ifndef PORTIO_H -#define PORTIO_H 1 +#ifndef HEADER_IO_H +#define HEADER_IO_H 1 #include #include static inline uint8_t -inb(uint16_t port) +inb (uint16_t port) { uint8_t data; asm volatile ("inb %w1,%0" : "=a" (data) : "d" (port)); @@ -13,16 +13,16 @@ inb(uint16_t port) } static inline void -insb(uint16_t port, void *addr, size_t cnt) +insb (uint16_t port, void *addr, size_t cnt) { - asm volatile ("cld\n\trepne\n\tinsb" : - "=D" (addr), "=c" (cnt) : - "d" (port), "0" (addr), "1" (cnt) : - "memory", "cc"); + asm volatile ("cld; repne; insb" + : "=D" (addr), "=c" (cnt) + : "d" (port), "0" (addr), "1" (cnt) + : "memory", "cc"); } static inline uint16_t -inw(uint16_t port) +inw (uint16_t port) { uint16_t data; asm volatile ("inw %w1,%0" : "=a" (data) : "d" (port)); @@ -30,16 +30,16 @@ inw(uint16_t port) } static inline void -insw(uint16_t port, void *addr, size_t cnt) +insw (uint16_t port, void *addr, size_t cnt) { - asm volatile ("cld\n\trepne\n\tinsw" : - "=D" (addr), "=c" (cnt) : - "d" (port), "0" (addr), "1" (cnt) : - "memory", "cc"); + asm volatile ("cld; repne; insw" + : "=D" (addr), "=c" (cnt) + : "d" (port), "0" (addr), "1" (cnt) + : "memory", "cc"); } static inline uint32_t -inl(uint16_t port) +inl (uint16_t port) { uint32_t data; asm volatile ("inl %w1,%0" : "=a" (data) : "d" (port)); @@ -49,10 +49,10 @@ inl(uint16_t port) static inline void insl(uint16_t port, void *addr, size_t cnt) { - asm volatile ("cld\n\trepne\n\tinsl" : - "=D" (addr), "=c" (cnt) : - "d" (port), "0" (addr), "1" (cnt) : - "memory", "cc"); + asm volatile ("cld; repne; insl" + : "=D" (addr), "=c" (cnt) + : "d" (port), "0" (addr), "1" (cnt) + : "memory", "cc"); } static inline void @@ -62,31 +62,31 @@ outb(uint16_t port, uint8_t data) } static inline void -outsb(uint16_t port, const void *addr, size_t cnt) +outsb (uint16_t port, const void *addr, size_t cnt) { - asm volatile ("cld\n\trepne\n\toutsb" : - "=S" (addr), "=c" (cnt) : - "d" (port), "0" (addr), "1" (cnt) : - "cc"); + asm volatile ("cld; repne; outsb" + : "=S" (addr), "=c" (cnt) + : "d" (port), "0" (addr), "1" (cnt) + : "cc"); } static inline void -outw(uint16_t port, uint16_t data) +outw (uint16_t port, uint16_t data) { asm volatile ("outw %0,%w1" : : "a" (data), "d" (port)); } static inline void -outsw(uint16_t port, const void *addr, size_t cnt) +outsw (uint16_t port, const void *addr, size_t cnt) { - asm volatile ("cld\n\trepne\n\toutsw" : - "=S" (addr), "=c" (cnt) : - "d" (port), "0" (addr), "1" (cnt) : - "cc"); + asm volatile ("cld; repne; outsw" + : "=S" (addr), "=c" (cnt) + : "d" (port), "0" (addr), "1" (cnt) + : "cc"); } static inline void -outl(uint16_t port, uint32_t data) +outl (uint16_t port, uint32_t data) { asm volatile ("outl %0,%w1" : : "a" (data), "d" (port)); } -- 2.30.2