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:
Andreas Kling 2020-02-28 12:29:14 +01:00
commit dcd619bd46
Notes: sideshowbarker 2024-07-19 08:59:23 +09:00
6 changed files with 13 additions and 36 deletions

View file

@ -34,10 +34,9 @@ __BEGIN_DECLS
int shbuf_create(int, void** buffer);
int shbuf_allow_pid(int, pid_t peer_pid);
int shbuf_allow_all(int);
void* shbuf_get(int shbuf_id);
void* shbuf_get(int shbuf_id, size_t* size);
int shbuf_release(int shbuf_id);
int shbuf_seal(int shbuf_id);
int shbuf_get_size(int shbuf_id);
int module_load(const char* path, size_t path_length);
int module_unload(const char* name, size_t name_length);