diff options
| author | Mathias Agopian <mathias@google.com> | 2011-08-09 18:55:44 -0700 |
|---|---|---|
| committer | Mathias Agopian <mathias@google.com> | 2011-08-09 18:55:44 -0700 |
| commit | 5c9be402a4d934b678fe6609b6cc4d488d6ddaa4 (patch) | |
| tree | 4a7829a83e1b4fc5710a21dc56fe1ba1bbacee6a /include/system | |
| parent | 5d5816c484f124ca52c53cd434955b9782a486a5 (diff) | |
| download | system_core-5c9be402a4d934b678fe6609b6cc4d488d6ddaa4.tar.gz system_core-5c9be402a4d934b678fe6609b6cc4d488d6ddaa4.tar.bz2 system_core-5c9be402a4d934b678fe6609b6cc4d488d6ddaa4.zip | |
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
Diffstat (limited to 'include/system')
| -rw-r--r-- | include/system/graphics.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/system/graphics.h b/include/system/graphics.h index d39bd4e1..77cd3370 100644 --- a/include/system/graphics.h +++ b/include/system/graphics.h @@ -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 */ |
