git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
regression: mmap for fd
[lunaix-os.git]
/
lunaix-os
/
kernel
/
asm
/
x86
/
i386_isrm.c
diff --git
a/lunaix-os/kernel/asm/x86/i386_isrm.c
b/lunaix-os/kernel/asm/x86/i386_isrm.c
index 0a26c3be2a7a55a7286d4fae754d4e97b891ebc2..9c18637157d46f2d9aefdb2c2292ffef169f339b 100644
(file)
--- a/
lunaix-os/kernel/asm/x86/i386_isrm.c
+++ b/
lunaix-os/kernel/asm/x86/i386_isrm.c
@@
-25,7
+25,7
@@
isrm_init()
}
}
}
}
-static inline
uint32_
t
+static inline
in
t
__ivalloc_within(size_t a, size_t b, isr_cb handler)
{
a = (a - IV_BASE) / 8;
__ivalloc_within(size_t a, size_t b, isr_cb handler)
{
a = (a - IV_BASE) / 8;
@@
-39,27
+39,27
@@
__ivalloc_within(size_t a, size_t b, isr_cb handler)
j++;
}
iv_bmp[i] |= 1 << j;
j++;
}
iv_bmp[i] |= 1 << j;
-
uint32_
t iv = IV_BASE + i * 8 + j;
+
in
t iv = IV_BASE + i * 8 + j;
handlers[iv] = handler ? handler : intr_routine_fallback;
return iv;
}
return 0;
}
handlers[iv] = handler ? handler : intr_routine_fallback;
return iv;
}
return 0;
}
-
uint32_
t
+
in
t
isrm_ivosalloc(isr_cb handler)
{
return __ivalloc_within(IV_BASE, IV_EX, handler);
}
isrm_ivosalloc(isr_cb handler)
{
return __ivalloc_within(IV_BASE, IV_EX, handler);
}
-
uint32_
t
+
in
t
isrm_ivexalloc(isr_cb handler)
{
return __ivalloc_within(IV_EX, IV_MAX, handler);
}
void
isrm_ivexalloc(isr_cb handler)
{
return __ivalloc_within(IV_EX, IV_MAX, handler);
}
void
-isrm_ivfree(
uint32_
t iv)
+isrm_ivfree(
in
t iv)
{
assert(iv < 256);
if (iv >= IV_BASE) {
{
assert(iv < 256);
if (iv >= IV_BASE) {
@@
-68,10
+68,10
@@
isrm_ivfree(uint32_t iv)
handlers[iv] = intr_routine_fallback;
}
handlers[iv] = intr_routine_fallback;
}
-
uint32_
t
-isrm_bindirq(
uint32_
t irq, isr_cb irq_handler)
+
in
t
+isrm_bindirq(
in
t irq, isr_cb irq_handler)
{
{
-
uint32_
t iv;
+
in
t iv;
if (!(iv = isrm_ivexalloc(irq_handler))) {
panickf("out of IV resource. (irq=%d)", irq);
return 0; // never reach
if (!(iv = isrm_ivexalloc(irq_handler))) {
panickf("out of IV resource. (irq=%d)", irq);
return 0; // never reach
@@
-83,8
+83,8
@@
isrm_bindirq(uint32_t irq, isr_cb irq_handler)
return iv;
}
return iv;
}
-
uint32_
t
-isrm_bindiv(
uint32_
t iv, isr_cb handler)
+
in
t
+isrm_bindiv(
in
t iv, isr_cb handler)
{
assert(iv < 256);
if (iv >= IV_BASE) {
{
assert(iv < 256);
if (iv >= IV_BASE) {
@@
-94,7
+94,7
@@
isrm_bindiv(uint32_t iv, isr_cb handler)
}
isr_cb
}
isr_cb
-isrm_get(
uint32_
t iv)
+isrm_get(
in
t iv)
{
assert(iv < 256);
return handlers[iv];
{
assert(iv < 256);
return handlers[iv];