1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 12:05:07 +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:
Andreas Kling 2020-02-28 11:45:19 +01:00
parent 8460d02651
commit f72e5bbb17
36 changed files with 549 additions and 549 deletions

View file

@ -477,7 +477,7 @@ void Window::set_hovered_widget(Widget* widget)
void Window::set_current_backing_bitmap(Gfx::Bitmap& bitmap, bool flush_immediately)
{
WindowServerConnection::the().send_sync<Messages::WindowServer::SetWindowBackingStore>(m_window_id, 32, bitmap.pitch(), bitmap.shared_buffer_id(), bitmap.has_alpha_channel(), bitmap.size(), flush_immediately);
WindowServerConnection::the().send_sync<Messages::WindowServer::SetWindowBackingStore>(m_window_id, 32, bitmap.pitch(), bitmap.shbuf_id(), bitmap.has_alpha_channel(), bitmap.size(), flush_immediately);
}
void Window::flip(const Vector<Gfx::Rect, 32>& dirty_rects)
@ -551,17 +551,17 @@ void Window::apply_icon()
if (!m_window_id)
return;
int rc = seal_shared_buffer(m_icon->shared_buffer_id());
int rc = shbuf_seal(m_icon->shbuf_id());
ASSERT(rc == 0);
rc = share_buffer_globally(m_icon->shared_buffer_id());
rc = shbuf_allow_all(m_icon->shbuf_id());
ASSERT(rc == 0);
static bool has_set_process_icon;
if (!has_set_process_icon)
set_process_icon(m_icon->shared_buffer_id());
set_process_icon(m_icon->shbuf_id());
WindowServerConnection::the().send_sync<Messages::WindowServer::SetWindowIconBitmap>(m_window_id, m_icon->shared_buffer_id(), m_icon->size());
WindowServerConnection::the().send_sync<Messages::WindowServer::SetWindowIconBitmap>(m_window_id, m_icon->shbuf_id(), m_icon->size());
}
void Window::start_wm_resize()