[PATCH i-g-t v4 0/4] Use C11 atomics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series replaces calls to the __sync_* functions with the more
recent atomic_* ones defined in stdatomic.h in gem_create and
sw_sync.  It also adds dependency on libatomic when required, that is
to say when the CPU architecture doesn't provide native support for
some atomic operations.  This makes the tests more portable, in
particular for 32-bit MIPS which doesn't support 64-bit atomics.

v2:
 - add linker test to only add dependency on libatomic when needed
 - only add libatomic dependency to gem_create and sw_sync
 - use stdatomic.h and _Atomic type modifier
 - explicitly require libatomic in all Docker images

v3:
 - use sub-arch libatomic1 in Debian docker images
 - use null_dep in meson.build

v4:
 - rebase with changes in Dockerfile.debian-minimal

Guillaume Tucker (4):
  meson: add libatomic dependency
  gitlab-ci: add libatomic to docker images
  i915/gem_create: use atomic_* instead of __sync_*
  tests/sw_sync: use atomic_* instead of __sync_*

 Dockerfile.debian-arm64   |  1 +
 Dockerfile.debian-armhf   |  1 +
 Dockerfile.debian-minimal |  1 +
 Dockerfile.fedora         |  2 +-
 meson.build               | 14 ++++++++++++++
 tests/Makefile.am         |  3 ++-
 tests/i915/gem_create.c   | 16 ++++++++++++----
 tests/meson.build         | 17 +++++++++++++++--
 tests/sw_sync.c           | 12 ++++++------
 9 files changed, 53 insertions(+), 14 deletions(-)

--
2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux