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

Commit 5c9be402 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

Add a priority constant in to the graphics HAL header

this is needed if a display/gpu driver needs to create
service threads that can block the main ui thread.
to avoid priority inversions, these must run at
HAL_PRIORITY_URGENT_DISPLAY

Change-Id: I3af592e05a6d1b6f39a2b7885a7c842e54abfce2
parent 5d5816c4
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -19,6 +19,20 @@

__BEGIN_DECLS

/*
 * If the HAL needs to create service threads to handle graphics related
 * tasks, these threads need to run at HAL_PRIORITY_URGENT_DISPLAY priority
 * if they can block the main rendering thread in any way.
 *
 * the priority of the current thread can be set with:
 *
 *      #include <sys/resource.h>
 *      setpriority(PRIO_PROCESS, 0, HAL_PRIORITY_URGENT_DISPLAY);
 *
 */

#define HAL_PRIORITY_URGENT_DISPLAY     (-8)

/**
 * pixel format definitions
 */