Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b07c28b9 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

add a ctor to Mutex to specify the type, which can be shared. This is used by...

add a ctor to Mutex to specify the type, which can be shared. This is used by sf and af an soon will allow some optimization in the kernel for non shared mutexes
parent 43d2c03d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -98,6 +98,8 @@ struct layer_cblk_t // (128 bytes)

struct per_client_cblk_t   // 4KB max
{
    per_client_cblk_t() : lock(Mutex::SHARED) { }

                Mutex           lock;
                Condition       cv;
                layer_cblk_t    layers[NUM_LAYERS_MAX] __attribute__((aligned(32)));
+1 −1
Original line number Diff line number Diff line
@@ -891,7 +891,7 @@ void AudioTrack::AudioTrackThread::onFirstRef()
// =========================================================================

audio_track_cblk_t::audio_track_cblk_t()
    : user(0), server(0), userBase(0), serverBase(0), buffers(0), frameCount(0),
    : lock(Mutex::SHARED), user(0), server(0), userBase(0), serverBase(0), buffers(0), frameCount(0),
    loopStart(UINT_MAX), loopEnd(UINT_MAX), loopCount(0), volumeLR(0), flowControlFlag(1), forceReady(0)
{
}