summaryrefslogtreecommitdiff
path: root/Base/usr/share
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-28 11:45:19 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-28 12:55:58 +0100
commitf72e5bbb17cd54aa0e75e4436ddcd7ca0fda4648 (patch)
tree4f66b2ea3a3ebfbde38c95832a2b21de373af291 /Base/usr/share
parent8460d02651a1669ba3cdcc7cf277ceda1c0447de (diff)
downloadserenity-f72e5bbb17cd54aa0e75e4436ddcd7ca0fda4648.zip
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.
Diffstat (limited to 'Base/usr/share')
-rw-r--r--Base/usr/share/man/man2/create_shared_buffer.md27
-rw-r--r--Base/usr/share/man/man2/shbuf_allow_pid.md (renamed from Base/usr/share/man/man2/share_buffer_with.md)12
-rw-r--r--Base/usr/share/man/man2/shbuf_create.md27
3 files changed, 33 insertions, 33 deletions
diff --git a/Base/usr/share/man/man2/create_shared_buffer.md b/Base/usr/share/man/man2/create_shared_buffer.md
deleted file mode 100644
index 10fb26ca63..0000000000
--- a/Base/usr/share/man/man2/create_shared_buffer.md
+++ /dev/null
@@ -1,27 +0,0 @@
-## Name
-
-create\_shared\_buffer - create a shareable memory buffer
-
-## Synopsis
-```**c++
-#include <SharedBuffer.h>
-
-int create_shared_buffer(int size, void** buffer);
-```
-
-## Description
-
-Creates a new memory region that can be shared with other processes. The region is only accessible to the creating process by default.
-
-## Return value
-
-If a region is successfully created, `create_shared_buffer()` 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
-
-* [`share_buffer_with`(2)](share_buffer_with.md)
diff --git a/Base/usr/share/man/man2/share_buffer_with.md b/Base/usr/share/man/man2/shbuf_allow_pid.md
index 48ee1d1f6f..649c908671 100644
--- a/Base/usr/share/man/man2/share_buffer_with.md
+++ b/Base/usr/share/man/man2/shbuf_allow_pid.md
@@ -1,17 +1,17 @@
## Name
-share\_buffer\_with - allow another process to map a shareable buffer
+shbuf\_allow\_pid - allow another process to map a shareable buffer
## Synopsis
```**c++
#include <SharedBuffer.h>
-int share_buffer_with(int shared_buffer_id, pid_t peer_pid);
+int shbuf_allow_pid(int shbuf_id, pid_t peer_pid);
```
## Description
-Gives the process with PID `peer_pid` permission to map the shareable buffer with ID `shared_buffer_id`.
+Gives the process with PID `peer_pid` permission to map the shareable buffer with ID `shbuf_id`.
## Return value
@@ -19,10 +19,10 @@ On success, returns 0. Otherwise, returns -1 and `errno` is set.
## Errors
-* `EINVAL`: `peer_pid` is invalid, or `shared_buffer_id` is not a valid ID.
-* `EPERM`: The calling process does not have access to the buffer with `shared_buffer_id`.
+* `EINVAL`: `peer_pid` is invalid, or `shbuf_id` is not a valid ID.
+* `EPERM`: The calling process does not have access to the buffer with `shbuf_id`.
* `ESRCH`: No process with PID `peer_pid` is found.
## See also
-* [`create_shared_buffer`(2)](create_shared_buffer.md)
+* [`shbuf_create`(2)](shbuf_create.md)
diff --git a/Base/usr/share/man/man2/shbuf_create.md b/Base/usr/share/man/man2/shbuf_create.md
new file mode 100644
index 0000000000..1a05a4efe3
--- /dev/null
+++ b/Base/usr/share/man/man2/shbuf_create.md
@@ -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)