mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
Terminal: Redraw entire line if any of its characters are dirty.
This means we only have to do one fill_rect() per line and the whole process ends up being ~10% faster than before. Also added a read_tsc() syscall to give userspace access to the TSC.
This commit is contained in:
parent
11b73c38d8
commit
267a903dd0
9 changed files with 108 additions and 35 deletions
|
@ -2081,3 +2081,13 @@ int Process::sys$unlink(const char* pathname)
|
|||
return error;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Process::sys$read_tsc(dword* lsw, dword* msw)
|
||||
{
|
||||
if (!validate_write_typed(lsw))
|
||||
return -EFAULT;
|
||||
if (!validate_write_typed(msw))
|
||||
return -EFAULT;
|
||||
read_tsc(*lsw, *msw);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -194,6 +194,7 @@ public:
|
|||
clock_t sys$times(tms*);
|
||||
int sys$utime(const char* pathname, const struct utimbuf*);
|
||||
int sys$unlink(const char* pathname);
|
||||
int sys$read_tsc(dword* lsw, dword* msw);
|
||||
|
||||
int gui$create_window(const GUI_WindowParameters*);
|
||||
int gui$destroy_window(int window_id);
|
||||
|
|
|
@ -213,6 +213,8 @@ static dword handle(RegisterDump& regs, dword function, dword arg1, dword arg2,
|
|||
return current->gui$set_window_rect((int)arg1, (const GUI_Rect*)arg2);
|
||||
case Syscall::SC_gui_get_window_rect:
|
||||
return current->gui$get_window_rect((int)arg1, (GUI_Rect*)arg2);
|
||||
case Syscall::SC_read_tsc:
|
||||
return current->sys$read_tsc((dword*)arg1, (dword*)arg2);
|
||||
default:
|
||||
kprintf("<%u> int0x80: Unknown function %u requested {%x, %x, %x}\n", current->pid(), function, arg1, arg2, arg3);
|
||||
break;
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
__ENUMERATE_SYSCALL(select) \
|
||||
__ENUMERATE_SYSCALL(unlink) \
|
||||
__ENUMERATE_SYSCALL(poll) \
|
||||
__ENUMERATE_SYSCALL(read_tsc) \
|
||||
__ENUMERATE_SYSCALL(gui_create_window) \
|
||||
__ENUMERATE_SYSCALL(gui_destroy_window) \
|
||||
__ENUMERATE_SYSCALL(gui_get_window_backing_store) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue