* sched.h

* format

* screen.h

* sched.h and scheduler.h

* empty commit

* remove screen.h

* format

* Fix

* fix bss

* remove line

* Whoops

* remove dupllicated structs

* ...

* c'mon

* Add TASK_FRAMEBUFFER macro

* format
This commit is contained in:
Anghelo Carvajal
2021-11-14 18:38:27 -03:00
committed by GitHub
parent 602f348928
commit 0a953f7aea
8 changed files with 126 additions and 94 deletions
+3 -3
View File
@@ -225,7 +225,7 @@ s32 Sched_TaskCheckFramebuffers(SchedContext* sched, OSScTask* task) {
void* nextFB = osViGetNextFramebuffer();
void* curFB = osViGetCurrentFramebuffer();
if (task == NULL || sched->pendingSwapBuf1 != NULL || (curFB == task->framebuffer->fb1 && curFB != nextFB)) {
if (task == NULL || sched->pendingSwapBuf1 != NULL || (curFB == TASK_FRAMEBUFFER(task)->fb1 && curFB != nextFB)) {
return 0;
}
return 1;
@@ -257,7 +257,7 @@ s32 Sched_Schedule(SchedContext* sched, OSScTask** spTask, OSScTask** dpTask, s3
}
}
} else if (ret == (OS_SC_SP | OS_SC_DP)) {
if (gfxTask->framebuffer == NULL || Sched_TaskCheckFramebuffers(sched, gfxTask)) {
if (TASK_FRAMEBUFFER(gfxTask) == NULL || Sched_TaskCheckFramebuffers(sched, gfxTask)) {
*spTask = *dpTask = gfxTask;
ret &= ~(OS_SC_SP | OS_SC_DP);
sched->gfxListHead = sched->gfxListHead->next;
@@ -271,7 +271,7 @@ s32 Sched_Schedule(SchedContext* sched, OSScTask** spTask, OSScTask** dpTask, s3
}
void Sched_TaskUpdateFramebuffer(SchedContext* sched, OSScTask* task) {
sched->pendingSwapBuf1 = task->framebuffer;
sched->pendingSwapBuf1 = TASK_FRAMEBUFFER(task);
if (sched->curBuf != NULL && sched->curBuf->updateRate2 > 0) {
return;