mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:57:44 +00:00
Kernel+LibC: Rename shared buffer syscalls to use a prefix
This feels a lot more consistent and Unixy: create_shared_buffer() => shbuf_create() share_buffer_with() => shbuf_allow_pid() share_buffer_globally() => shbuf_allow_all() get_shared_buffer() => shbuf_get() release_shared_buffer() => shbuf_release() seal_shared_buffer() => shbuf_seal() get_shared_buffer_size() => shbuf_get_size() Also, "shared_buffer_id" is shortened to "shbuf_id" all around.
This commit is contained in:
parent
8460d02651
commit
f72e5bbb17
36 changed files with 549 additions and 549 deletions
27
Base/usr/share/man/man2/shbuf_create.md
Normal file
27
Base/usr/share/man/man2/shbuf_create.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
## Name
|
||||
|
||||
shbuf\_create - create a shareable memory buffer
|
||||
|
||||
## Synopsis
|
||||
```**c++
|
||||
#include <SharedBuffer.h>
|
||||
|
||||
int shbuf_create(int size, void** buffer);
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
Creates a new memory region that can be shared with other processes. The region is only accessible to the calling process by default.
|
||||
|
||||
## Return value
|
||||
|
||||
If a region is successfully created, `shbuf_create()` stores a pointer to the memory in `buffer` and returns a buffer ID. Otherwise, it returns -1 and sets `errno` to describe the error.
|
||||
|
||||
## Errors
|
||||
|
||||
* `EINVAL`: `size` is zero or negative.
|
||||
* `EFAULT`: `buffer` is not a valid address.
|
||||
|
||||
## See also
|
||||
|
||||
* [`shbuf_allow_pid`(2)](shbuf_allow_pid.md)
|
Loading…
Add table
Add a link
Reference in a new issue