1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 11:55:08 +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:
Andreas Kling 2020-02-17 15:04:27 +01:00
parent 4f4af24b9d
commit 48f7c28a5c
37 changed files with 257 additions and 252 deletions

View file

@ -45,7 +45,7 @@ ssize_t InodeFile::read(FileDescription& description, u8* buffer, ssize_t count)
{
ssize_t nread = m_inode->read_bytes(description.offset(), count, buffer, &description);
if (nread > 0)
current->did_file_read(nread);
Thread::current->did_file_read(nread);
return nread;
}
@ -54,7 +54,7 @@ ssize_t InodeFile::write(FileDescription& description, const u8* data, ssize_t c
ssize_t nwritten = m_inode->write_bytes(description.offset(), count, data, &description);
if (nwritten > 0) {
m_inode->set_mtime(kgettimeofday().tv_sec);
current->did_file_write(nwritten);
Thread::current->did_file_write(nwritten);
}
return nwritten;
}