Compare commits

...

2 Commits

Author SHA1 Message Date
8098ff0616
tools: Avoid rebuilding libc and friends every single time
All checks were successful
continuous-integration/drone/push Build is passing
We do this by preserving timestamps when copying headers so CMake doesn't think they have changed.
2023-01-25 21:16:20 +01:00
635437a4a4
luna: Add a new idiomatic way to mark unused parameters as used while keeping their names
Just call ignore(...)
2023-01-25 21:14:44 +01:00
3 changed files with 14 additions and 5 deletions

View File

@ -1,6 +1,7 @@
#include "arch/PCI.h"
#include "arch/x86_64/IO.h"
#include <luna/Check.h>
#include <luna/Ignore.h>
#define PCI_ADDRESS_PORT 0xCF8
#define PCI_VALUE_PORT 0xCFC
@ -30,18 +31,21 @@ namespace PCI
return IO::inl(PCI_VALUE_PORT);
}
void write8(const Device::Address&, u32, u8)
void write8(const Device::Address& address, u32 field, u8 value)
{
ignore(address, field, value);
todo();
}
void write16(const Device::Address&, u32, u16)
void write16(const Device::Address& address, u32 field, u8 value)
{
ignore(address, field, value);
todo();
}
void write32(const Device::Address&, u32, u32)
void write32(const Device::Address& address, u32 field, u8 value)
{
ignore(address, field, value);
todo();
}
}

View File

@ -0,0 +1,5 @@
#pragma once
template <class... Args> constexpr void ignore(Args...)
{
}

View File

@ -9,5 +9,5 @@ mkdir -p $LUNA_BASE
mkdir -p $LUNA_BASE/usr/include
mkdir -p $LUNA_BASE/usr/include/luna
cp -RT libc/include/ $LUNA_BASE/usr/include
cp -RT luna/include/luna/ $LUNA_BASE/usr/include/luna
cp --preserve=timestamps -RT libc/include/ $LUNA_BASE/usr/include
cp --preserve=timestamps -RT luna/include/luna/ $LUNA_BASE/usr/include/luna