mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
i965: perf: ensure reading config IDs from sysfs isn't interrupted
Fixes:458468c136"i965: Expose OA counters via INTEL_performance_query" Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (cherry picked from commitbd9672695b)
This commit is contained in:
parent
c6849c9314
commit
c49dde7f43
1 changed files with 2 additions and 1 deletions
|
|
@ -1718,7 +1718,8 @@ read_file_uint64(const char *file, uint64_t *val)
|
|||
fd = open(file, 0);
|
||||
if (fd < 0)
|
||||
return false;
|
||||
n = read(fd, buf, sizeof (buf) - 1);
|
||||
while ((n = read(fd, buf, sizeof (buf) - 1)) < 0 &&
|
||||
errno == EINTR);
|
||||
close(fd);
|
||||
if (n < 0)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue