1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:37:36 +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

@ -92,7 +92,7 @@ OwnPtr<Messages::AudioServer::SetMainMixVolumeResponse> ASClientConnection::hand
OwnPtr<Messages::AudioServer::EnqueueBufferResponse> ASClientConnection::handle(const Messages::AudioServer::EnqueueBuffer& message)
{
auto shared_buffer = SharedBuffer::create_from_shared_buffer_id(message.buffer_id());
auto shared_buffer = SharedBuffer::create_from_shbuf_id(message.buffer_id());
if (!shared_buffer) {
// FIXME: The shared buffer should have been retrieved for us already.
// We don't want to do IPC error checking at this layer.

View file

@ -64,7 +64,7 @@ public:
++m_played_samples;
if (m_position >= m_current->sample_count()) {
m_client->did_finish_playing_buffer({}, m_current->shared_buffer_id());
m_client->did_finish_playing_buffer({}, m_current->shbuf_id());
m_current = nullptr;
m_position = 0;
}
@ -93,7 +93,7 @@ public:
int get_playing_buffer() const
{
if (m_current)
return m_current->shared_buffer_id();
return m_current->shbuf_id();
return -1;
}