1
Fork 0
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:
Andreas Kling 2018-10-16 14:33:16 +02:00
parent 12e515735b
commit aec8ab0a60
13 changed files with 52 additions and 58 deletions

View file

@ -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
View file

@ -0,0 +1,8 @@
#pragma once
#ifdef SERENITY_KERNEL
#include <Kernel/kstdio.h>
#else
#include <cstdio>
#define kprintf printf
#endif