summaryrefslogtreecommitdiff
path: root/xf86atomic.h
AgeCommit message (Collapse)Author
2015-03-13Use __sync_add_and_fetch instead of __sync_fetch_and_add for atomic_dec_and_testMaarten Lankhorst
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Acked-By: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-13Add atomic_inc_return to atomics.Maarten Lankhorst
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Acked-By: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-12Stop undefining _ATOMIC_TYPE in Solaris/NetBSD section of xf86atomic.hAlan Coopersmith
Since the atomic_set() macro references _ATOMIC_TYPE, undefining it broke that macro, resulting in build errors of: "intel_bufmgr_gem.c", line 775: undefined symbol: _ATOMIC_TYPE Now that we're leaving the macro in the namespace, renamed it to start with LIBDRM_ instead of _ to avoid polluting others namespace. Regression introduced in 87fdd32c8779648 Add NetBSD atomic ops support. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-By: Thomas Klausner <wiz@NetBSD.org>
2015-01-26Add NetBSD atomic ops support.Thomas Klausner
Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
2015-01-26Fix libdrm's atomic_dec_and_test on Solaris.Thomas Klausner
_nv means new value, not old value! Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
2014-09-15atomic: add atomic_add_unless()Lionel Landwerlin
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2010-04-16Correct the Solaris definitions of atomic_add & atomic_decAlan Coopersmith
The #defines added in 966c9907c040b4fe4b288b4a9d82598797aee743 were mapping these to functions that don't exist. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-03-17libdrm_radeon: Optimize cs_gem_reloc to do less looping.Pauli Nieminen
bo->referenced_in_cs is checked if bo is already in cs. Adding and removing reference in bo is done with atomic operations to allow parallel access to a bo from multiple contexts. cs->id generation code quarentees there is not duplicated ids which limits number of cs->ids to 32. If there is more cs objects rest will get id 0. V2: - Fix configure to check for atomics operations if libdrm_radeon is only selected. - Make atomic operations private to libdrm. This optimization decreases cs_write_reloc share of torcs profiling from 4.3% to 2.6%. Tested-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2010-03-17libdrm: Move intel_atomic.h to libdrm core for sharing.Pauli Nieminen
intel_atomic.h includes very usefull atomic operations for lock free parrallel access of variables. Moving these to core libdrm for code sharing with radeon. Signed-off-by: Pauli Nieminen <suokkos@gmail.com>