summaryrefslogtreecommitdiff
path: root/src/kernel/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/util.h')
-rw-r--r--src/kernel/util.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/kernel/util.h b/src/kernel/util.h
index 243541c..324f379 100644
--- a/src/kernel/util.h
+++ b/src/kernel/util.h
@@ -10,8 +10,8 @@ static inline void outb(uint16_t port, uint8_t value) {
: : "a"(value), "Nd"(port));
}
static inline uint8_t inb(uint16_t port) {
- uint8_t value;
- asm volatile (
+ volatile uint8_t value;
+ asm (
"inb %1, %0"
: "=a"(value) : "Nd"(port));
return value;
@@ -22,8 +22,8 @@ static inline void outw(uint16_t port, uint16_t value) {
: : "a"(value), "Nd"(port));
}
static inline uint16_t inw(uint16_t port) {
- uint16_t value;
- asm volatile (
+ volatile uint16_t value;
+ asm (
"inw %1, %0"
: "=a"(value) : "Nd"(port));
return value;
@@ -34,15 +34,15 @@ static inline void outd(uint16_t port, uint32_t value) {
: : "a"(value), "Nd"(port));
}
static inline uint32_t ind(uint16_t port) {
- uint32_t value;
- asm volatile (
+ volatile uint32_t value;
+ asm (
"inl %1, %0"
: "=a"(value) : "Nd"(port));
return value;
}
-void memcpy(void *to, void *from, uint32_t n);
-void fmcpy(void *to, struct drive *d, drive_file_id_t f, uint32_t from, uint32_t n);
+void memcpy(void *to, const void *from, uint32_t n);
+void fmcpy(void *to, const struct drive *d, drive_file_id_t f, uint32_t from, uint32_t n);
void u32_dec(uint32_t n, char *b);
void u16_dec(uint16_t n, char *b);