Displaying 13 results from an estimated 13 matches for "__sync_fetch_and_add".
Did you mean:
__sync_fetch_and_add_4
2011 Mar 07
1
[1.8.3] Error compiling Asterisk: __sync_fetch_and_add
....o tcptls.o tdd.o term.o test.o threadstorage.o
timing.o translate.o udptl.o ulaw.o utils.o version.o xml.o xmldoc.o
editline/libedit.a db1-ast/libdb1.a -> asterisk
astobj2.o: In function `ast_atomic_fetchadd_int':
/usr/src/asterisk-1.8.3/include/asterisk/lock.h:589: undefined reference to
`__sync_fetch_and_add_4'
/usr/src/asterisk-1.8.3/include/asterisk/lock.h:589: undefined reference to
`__sync_fetch_and_add_4'
/usr/src/asterisk-1.8.3/include/asterisk/lock.h:589: undefined reference to
`__sync_fetch_and_add_4'
/usr/src/asterisk-1.8.3/include/asterisk/lock.h:589: undefined reference to
`__syn...
2013 May 14
2
[LLVMdev] Keeping Clang from changing function calls to IR operations: cmpxchg
I'm working on getting the LLVM/projects/Test-Suite/UnitTest to compile for
a target that I am developing.
There is an example: AtomicOps, that uses calls to:
__sync_fetch_and_add
__sync_val_compare_and_swap
__sync_lock_test_and_set
These get converted into llvm IR operations like:
atomicrmw
cmpxchg
Is there any way to keep these as function calls, as they are easier to map
to the target's eventual functional then having to deal with atomicrmw and
cmpxchg
------------...
2013 Mar 15
1
Re: [PATCH 6/9] tools: memshr: arm64 support
...agating these sorts of asm atomic operations throughout
> our code base. Other options would be:
gcc has atomic builtins to do this kind of work. I don''t know about arm, but they do the job in x86
http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html
so atomic_inc(val) -> __sync_fetch_and_add(val, 1) and likewise for dec/sub
Andres
>
> - use libatomic-ops, http://www.hpl.hp.com/research/linux/atomic_ops/, although
> this doesn''t seem to be as widespread as I would like (not in RHEL5 for
> example)
> - use a pthread lock. This is probably the simplest/best op...
2015 Feb 26
4
[PATCH v2 1/4] Add atomic_inc_return to atomics.
...e changed, 3 insertions(+)
diff --git a/xf86atomic.h b/xf86atomic.h
index 8c4b696..17fb088 100644
--- a/xf86atomic.h
+++ b/xf86atomic.h
@@ -49,6 +49,7 @@ typedef struct {
# define atomic_read(x) ((x)->atomic)
# define atomic_set(x, val) ((x)->atomic = (val))
# define atomic_inc(x) ((void) __sync_fetch_and_add (&(x)->atomic, 1))
+# define atomic_inc_return(x) (__sync_add_and_fetch (&(x)->atomic, 1))
# define atomic_dec_and_test(x) (__sync_fetch_and_add (&(x)->atomic, -1) == 1)
# define atomic_add(x, v) ((void) __sync_add_and_fetch(&(x)->atomic, (v)))
# define atomic_dec(x,...
2015 Feb 25
1
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...mic.h
>> index 8c4b696..66a8d9a 100644
>> --- a/xf86atomic.h
>> +++ b/xf86atomic.h
>> @@ -49,7 +49,8 @@ typedef struct {
>> # define atomic_read(x) ((x)->atomic)
>> # define atomic_set(x, val) ((x)->atomic = (val))
>> # define atomic_inc(x) ((void) __sync_fetch_and_add (&(x)->atomic, 1))
>> -# define atomic_dec_and_test(x) (__sync_fetch_and_add (&(x)->atomic, -1) == 1)
>> +# define atomic_inc_return(x) (__sync_add_and_fetch (&(x)->atomic, 1))
>> +# define atomic_dec_and_test(x) (__sync_add_and_fetch (&(x)->atomic, -1)...
2015 Feb 24
4
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...ot;);
+
+ return failed;
+}
diff --git a/xf86atomic.h b/xf86atomic.h
index 8c4b696..66a8d9a 100644
--- a/xf86atomic.h
+++ b/xf86atomic.h
@@ -49,7 +49,8 @@ typedef struct {
# define atomic_read(x) ((x)->atomic)
# define atomic_set(x, val) ((x)->atomic = (val))
# define atomic_inc(x) ((void) __sync_fetch_and_add (&(x)->atomic, 1))
-# define atomic_dec_and_test(x) (__sync_fetch_and_add (&(x)->atomic, -1) == 1)
+# define atomic_inc_return(x) (__sync_add_and_fetch (&(x)->atomic, 1))
+# define atomic_dec_and_test(x) (__sync_add_and_fetch (&(x)->atomic, -1) == 0)
# define atomic_add...
2013 May 14
0
[LLVMdev] Keeping Clang from changing function calls to IR operations: cmpxchg
...ng/lib/Basic/Targets.cpp
On Tue, May 14, 2013 at 3:46 PM, Dan <westdac at gmail.com> wrote:
>
> I'm working on getting the LLVM/projects/Test-Suite/UnitTest to compile
> for a target that I am developing.
>
> There is an example: AtomicOps, that uses calls to:
>
> __sync_fetch_and_add
> __sync_val_compare_and_swap
> __sync_lock_test_and_set
>
> These get converted into llvm IR operations like:
>
> atomicrmw
> cmpxchg
>
> Is there any way to keep these as function calls, as they are easier to
> map to the target's eventual functional then having...
2015 Feb 25
0
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...git a/xf86atomic.h b/xf86atomic.h
> index 8c4b696..66a8d9a 100644
> --- a/xf86atomic.h
> +++ b/xf86atomic.h
> @@ -49,7 +49,8 @@ typedef struct {
> # define atomic_read(x) ((x)->atomic)
> # define atomic_set(x, val) ((x)->atomic = (val))
> # define atomic_inc(x) ((void) __sync_fetch_and_add (&(x)->atomic, 1))
> -# define atomic_dec_and_test(x) (__sync_fetch_and_add (&(x)->atomic, -1) == 1)
> +# define atomic_inc_return(x) (__sync_add_and_fetch (&(x)->atomic, 1))
> +# define atomic_dec_and_test(x) (__sync_add_and_fetch (&(x)->atomic, -1) == 0)
The a...
2007 Jul 12
0
[LLVMdev] Atomic Operation and Synchronization Proposal v2
...n different hardware (and
TAS is faster than CAS on some architectures I think). For example, for TAS
a byte is sufficient, whereas with swap you probably would require that the
exchange has machine-word size.
> These implementations assume a very conservative interpretation.
> result = __sync_fetch_and_add( <ty>* ptr, <ty> value )
> call void @llvm.atomic.membarrier( i1 true, i1 true, i1 true,
> i1 true )
> %result = call <ty> @llvm.atomic.las( <ty>* %ptr, <ty> %value )
Shouldn't you have a second membar after the las() to be ve...
2015 Mar 19
0
[ANNOUNCE] libdrm 2.4.60
...intel: Export total subslice and EU counts
Jerome Glisse (1):
nouveau: fix unlock nouveau_bo_name_ref()
Kristian Høgsberg (1):
intel: Fix documentation for drm_intel_gem_bo_wait()
Maarten Lankhorst (4):
Add atomic_inc_return to atomics.
Use __sync_add_and_fetch instead of __sync_fetch_and_add for atomic_dec_and_test
nouveau: make nouveau importing global buffers completely thread-safe, with tests
nouveau: Do not add most bo's to the global bo list.
Philipp Zabel (1):
tests: add support for imx-drm
Thomas Klausner (4):
Fix libdrm's atomic_dec_and_test on...
2007 Jul 12
4
[LLVMdev] Atomic Operation and Synchronization Proposal v2
Hello,
This is the second major revision of the atomic proposal for LLVM. I
will try and give a brief overview of the motivating changes, but a
greater portion of the text has changed, along with some changes to
the proposed additions.
http://chandlerc.net/llvm_atomics.html
- The proposal has been rewritten to better delineate the goals and
purposes of LLVM, and these additions to LLVM. The why
2007 Jul 12
1
[LLVMdev] Atomic Operation and Synchronization Proposal v2
...ich support and size selection at
all, support it for all of the instructions necessary to implement
these operations. 'cas' and 'swap' will lower to single byte
instructions on x86 f.ex.
> > These implementations assume a very conservative interpretation.
> > result = __sync_fetch_and_add( <ty>* ptr, <ty> value )
> > call void @llvm.atomic.membarrier( i1 true, i1 true, i1 true,
> > i1 true )
> > %result = call <ty> @llvm.atomic.las( <ty>* %ptr, <ty> %value )
>
> Shouldn't you have a second membar a...
2018 Dec 06
3
Build error while upgrading samba 4.9.3
...: ok
Checking for variable IPV6_V6ONLY : ok
Checking for header net/if.h : yes
Checking for HAVE_IPV6 : ok
Checking whether we have ucontext_t : ok
Checking for __sync_fetch_and_add compiler builtin : ok
Checking for atomic_add_32 compiler builtin : not found
Checking for fallthrough attribute : not found
Checking for strdup : ok
Checking for memmem...