mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 14:47:34 +00:00
Add the basic character devices to kernel.
This commit is contained in:
parent
12e515735b
commit
aec8ab0a60
13 changed files with 52 additions and 58 deletions
|
@ -55,6 +55,13 @@ T exchange(T& a, U&& b)
|
|||
return tmp;
|
||||
}
|
||||
|
||||
template<typename T, typename U>
|
||||
void swap(T& a, U& b)
|
||||
{
|
||||
U tmp = move((U&)a);
|
||||
a = (T&&)move(b);
|
||||
b = move(tmp);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -63,5 +70,6 @@ using AK::max;
|
|||
using AK::move;
|
||||
using AK::forward;
|
||||
using AK::exchange;
|
||||
using AK::swap;
|
||||
using AK::ceilDiv;
|
||||
|
||||
|
|
8
AK/kstdio.h
Normal file
8
AK/kstdio.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef SERENITY_KERNEL
|
||||
#include <Kernel/kstdio.h>
|
||||
#else
|
||||
#include <cstdio>
|
||||
#define kprintf printf
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue