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

Commit 5012a8fe authored by Jason Sams's avatar Jason Sams
Browse files

Fix another barrier bug 3333866

Atomically update put.

Change-Id: Id6d4b5c03f5562b3021561e95966a01abd293667
parent 74d39bd9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -100,7 +100,9 @@ void LocklessCommandFifo::commit(uint32_t command, uint32_t sizeInBytes) {
    //dumpState("commit 1");
    reinterpret_cast<uint16_t *>(mPut)[0] = command;
    reinterpret_cast<uint16_t *>(mPut)[1] = sizeInBytes;
    mPut += ((sizeInBytes + 3) & ~3) + 4;

    int32_t s = ((sizeInBytes + 3) & ~3) + 4;
    android_atomic_add(s, (int32_t *)&mPut);
    //dumpState("commit 2");
    mSignalToWorker.set();
}