mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:32:43 +00:00 
			
		
		
		
	 3817f5f619
			
		
	
	
		3817f5f619
		
	
	
	
	
		
			
			This is then used to implement the userspace dbgprintf() in a far more efficient way than what we had before. :^)
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			601 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			601 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include <Kernel/Devices/CharacterDevice.h>
 | |
| 
 | |
| class DebugLogDevice final : public CharacterDevice {
 | |
| public:
 | |
|     DebugLogDevice();
 | |
|     virtual ~DebugLogDevice() override;
 | |
| 
 | |
|     static DebugLogDevice& the();
 | |
| 
 | |
| private:
 | |
|     // ^CharacterDevice
 | |
|     virtual ssize_t read(Process&, byte*, ssize_t) override { return 0; }
 | |
|     virtual ssize_t write(Process&, const byte*, ssize_t) override;
 | |
|     virtual bool can_write(Process&) const override { return true; }
 | |
|     virtual bool can_read(Process&) const override { return true; }
 | |
|     virtual const char* class_name() const override { return "DebugLogDevice"; }
 | |
| };
 |