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:
Andreas Kling 2020-02-28 11:45:19 +01:00
parent 8460d02651
commit f72e5bbb17
Notes: sideshowbarker 2024-07-19 08:59:28 +09:00
36 changed files with 549 additions and 549 deletions

View file

@ -128,7 +128,7 @@ int Menu::realize_menu()
if (action.icon()) {
ASSERT(action.icon()->format() == Gfx::BitmapFormat::RGBA32);
ASSERT(action.icon()->size() == Gfx::Size(16, 16));
if (action.icon()->shared_buffer_id() == -1) {
if (action.icon()->shbuf_id() == -1) {
auto shared_buffer = SharedBuffer::create_with_size(action.icon()->size_in_bytes());
ASSERT(shared_buffer);
auto shared_icon = Gfx::Bitmap::create_with_shared_buffer(Gfx::BitmapFormat::RGBA32, *shared_buffer, action.icon()->size());
@ -137,7 +137,7 @@ int Menu::realize_menu()
shared_buffer->share_with(WindowServerConnection::the().server_pid());
action.set_icon(shared_icon);
}
icon_buffer_id = action.icon()->shared_buffer_id();
icon_buffer_id = action.icon()->shbuf_id();
}
auto shortcut_text = action.shortcut().is_valid() ? action.shortcut().to_string() : String();
bool exclusive = action.group() && action.group()->is_exclusive() && action.is_checkable();