mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 09:46:04 -05:00
fe237ee215
- Turn Keyboard into a CharacterDevice (85,1) at /dev/keyboard. - Implement MM::unmapRegionsForTask() and MM::unmapRegion() - Save SS correctly on interrupt. - Add a simple Spawn syscall for launching another process. - Move a bunch of IO syscall debug output behind DEBUG_IO. - Have ASSERT do a "cli" immediately when failing. This makes the output look proper every time. - Implement a bunch of syscalls in LibC. - Add a simple shell ("sh"). All it can do now is read a line of text from /dev/keyboard and then try launching the specified executable by calling spawn(). There are definitely bugs in here, but we're moving on forward.
25 lines
580 B
C++
25 lines
580 B
C++
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
#include <AK/DoublyLinkedList.h>
|
|
#include <AK/CircularQueue.h>
|
|
#include <VirtualFileSystem/CharacterDevice.h>
|
|
#include "IRQHandler.h"
|
|
|
|
class Keyboard final : public IRQHandler, public CharacterDevice {
|
|
public:
|
|
virtual ~Keyboard() override;
|
|
Keyboard();
|
|
|
|
private:
|
|
// ^IRQHandler
|
|
virtual void handleIRQ() override;
|
|
|
|
// ^CharacterDevice
|
|
virtual ssize_t read(byte* buffer, size_t) override;
|
|
virtual ssize_t write(const byte* buffer, size_t) override;
|
|
|
|
CircularQueue<byte, 16> m_queue;
|
|
byte m_modifiers { 0 };
|
|
};
|
|
|