Cleanup and refactor our atomic library.
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 9 May 2016 15:03:08 +0000 (17:03 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 9 May 2016 15:03:08 +0000 (17:03 +0200)
commitba3ae9ea273f7e596607281ffd77871e5a44fca7
tree64769eae9c8318432fe071358dcfcbc769faca12
parent299a25cb351d371dc6112f52e843f0a413269a3a
Cleanup and refactor our atomic library.

This commit:
* Removes most of all dirty internal details from public atomi_ops.h file, and move them into /intern private subdir.
* Removes unused 'architectures' (__apple__ and jemalloc).
* Split each implementation into its own file.
* Makes use of C99's limits.h system header to determine pointer and int size, instead of using fix hardcoded list of architectures.
* Introduces new 'faked' atomics ops for floats.

Note that we may add a lot more real and 'faked' atomic operations over integers and floats
(multiplication, division, bitshift, bitwise booleans, etc.), as needs arise.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1982
intern/atomic/atomic_ops.h
intern/atomic/intern/atomic_ops_ext.h [new file with mode: 0644]
intern/atomic/intern/atomic_ops_msvc.h [new file with mode: 0644]
intern/atomic/intern/atomic_ops_unix.h [new file with mode: 0644]
intern/atomic/intern/atomic_ops_utils.h [new file with mode: 0644]
source/blender/blenkernel/intern/pbvh.c