diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-05 22:40:00 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-05 22:40:00 +0100 |
commit | 31a3c83057fa5b563aa480e31ab975ceaed9abff (patch) | |
tree | 627f40d9acebaeb8f051762e2a4be32900a428d0 /i386 | |
parent | 2e85ea08a32706d7787fa7ec0e9873a49b1e52b8 (diff) | |
download | gnumach-31a3c83057fa5b563aa480e31ab975ceaed9abff.tar.gz gnumach-31a3c83057fa5b563aa480e31ab975ceaed9abff.tar.bz2 gnumach-31a3c83057fa5b563aa480e31ab975ceaed9abff.zip |
io_perm: Rename macro to better name
* i386/i386/io_perm.c (IS_IN_PROTECTED_RANGE): Rename to
CONTAINS_PCI_CFG.
Diffstat (limited to 'i386')
-rw-r--r-- | i386/i386/io_perm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/i386/i386/io_perm.c b/i386/i386/io_perm.c index 086d1d8f..c966102c 100644 --- a/i386/i386/io_perm.c +++ b/i386/i386/io_perm.c @@ -73,7 +73,7 @@ #define PCI_CFG2_START 0xc000 #define PCI_CFG2_END 0xcfff -#define IS_IN_PROTECTED_RANGE(from, to) \ +#define CONTAINS_PCI_CFG(from, to) \ ( ( ( from <= PCI_CFG1_END ) && ( to >= PCI_CFG1_START ) ) || \ ( ( from <= PCI_CFG2_END ) && ( to >= PCI_CFG2_START ) ) ) @@ -125,7 +125,7 @@ void io_perm_deallocate (io_perm_t io_perm) { /* We need to check if the io_perm was a PCI cfg one and release it */ - if (IS_IN_PROTECTED_RANGE(io_perm->from, io_perm->to)) + if (CONTAINS_PCI_CFG(io_perm->from, io_perm->to)) taken_pci_cfg = FALSE; } @@ -196,7 +196,7 @@ i386_io_perm_create (const ipc_port_t master_port, io_port_t from, io_port_t to, return KERN_INVALID_ARGUMENT; /* Only one process may take a range that includes PCI cfg registers */ - if (taken_pci_cfg && IS_IN_PROTECTED_RANGE(from, to)) + if (taken_pci_cfg && CONTAINS_PCI_CFG(from, to)) return KERN_PROTECTION_FAILURE; io_perm_t io_perm; @@ -230,7 +230,7 @@ i386_io_perm_create (const ipc_port_t master_port, io_port_t from, io_port_t to, *new = io_perm; - if (IS_IN_PROTECTED_RANGE(from, to)) + if (CONTAINS_PCI_CFG(from, to)) taken_pci_cfg = TRUE; return KERN_SUCCESS; |