mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:37:34 +00:00
LibGUI+Kernel: Add a GLock class (userspace mutex.)
It's basically a userspace port of the kernel's Lock class. Added gettid() and donate() syscalls to support the timeslice donation feature we already enjoyed in the kernel.
This commit is contained in:
parent
108b663618
commit
500df578fe
10 changed files with 176 additions and 12 deletions
|
@ -421,4 +421,16 @@ int ftruncate(int fd, off_t length)
|
|||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
int gettid()
|
||||
{
|
||||
int rc = syscall(SC_gettid);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int donate(int tid)
|
||||
{
|
||||
int rc = syscall(SC_donate, tid);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue