mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00:00
Kernel: Replace "current" with Thread::current and Process::current
Suggested by Sergey. The currently running Thread and Process are now Thread::current and Process::current respectively. :^)
This commit is contained in:
parent
4f4af24b9d
commit
48f7c28a5c
37 changed files with 257 additions and 252 deletions
|
@ -77,21 +77,21 @@ int MBVGADevice::ioctl(FileDescription&, unsigned request, unsigned arg)
|
|||
switch (request) {
|
||||
case FB_IOCTL_GET_SIZE_IN_BYTES: {
|
||||
auto* out = (size_t*)arg;
|
||||
if (!current->process().validate_write_typed(out))
|
||||
if (!Process::current->validate_write_typed(out))
|
||||
return -EFAULT;
|
||||
*out = framebuffer_size_in_bytes();
|
||||
return 0;
|
||||
}
|
||||
case FB_IOCTL_GET_BUFFER: {
|
||||
auto* index = (int*)arg;
|
||||
if (!current->process().validate_write_typed(index))
|
||||
if (!Process::current->validate_write_typed(index))
|
||||
return -EFAULT;
|
||||
*index = 0;
|
||||
return 0;
|
||||
}
|
||||
case FB_IOCTL_GET_RESOLUTION: {
|
||||
auto* resolution = (FBResolution*)arg;
|
||||
if (!current->process().validate_write_typed(resolution))
|
||||
if (!Process::current->validate_write_typed(resolution))
|
||||
return -EFAULT;
|
||||
resolution->pitch = m_framebuffer_pitch;
|
||||
resolution->width = m_framebuffer_width;
|
||||
|
@ -100,7 +100,7 @@ int MBVGADevice::ioctl(FileDescription&, unsigned request, unsigned arg)
|
|||
}
|
||||
case FB_IOCTL_SET_RESOLUTION: {
|
||||
auto* resolution = (FBResolution*)arg;
|
||||
if (!current->process().validate_read_typed(resolution) || !current->process().validate_write_typed(resolution))
|
||||
if (!Process::current->validate_read_typed(resolution) || !Process::current->validate_write_typed(resolution))
|
||||
return -EFAULT;
|
||||
resolution->pitch = m_framebuffer_pitch;
|
||||
resolution->width = m_framebuffer_width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue