mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:48:12 +00:00
Kernel: Merge the shbuf_get_size() syscall into shbuf_get()
Add an extra out-parameter to shbuf_get() that receives the size of the shared buffer. That way we don't need to make a separate syscall to get the size, which we always did immediately after.
This commit is contained in:
parent
a1514369d7
commit
dcd619bd46
6 changed files with 13 additions and 36 deletions
|
@ -553,9 +553,9 @@ int set_process_icon(int icon_id)
|
|||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
void* shbuf_get(int shbuf_id)
|
||||
void* shbuf_get(int shbuf_id, size_t* size)
|
||||
{
|
||||
int rc = syscall(SC_shbuf_get, shbuf_id);
|
||||
int rc = syscall(SC_shbuf_get, shbuf_id, size);
|
||||
if (rc < 0 && -rc < EMAXERRNO) {
|
||||
errno = -rc;
|
||||
return (void*)-1;
|
||||
|
@ -569,12 +569,6 @@ int shbuf_release(int shbuf_id)
|
|||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int shbuf_get_size(int shbuf_id)
|
||||
{
|
||||
int rc = syscall(SC_shbuf_get_size, shbuf_id);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int shbuf_seal(int shbuf_id)
|
||||
{
|
||||
int rc = syscall(SC_shbuf_seal, shbuf_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue