Commit Graph

14 Commits

Author SHA1 Message Date
Bastien Montagne
174d5cf627 atomic_ops: fix typo in func names (uint32 instead of uint64). 2015-07-01 12:25:31 +02:00
Sergey Sharybin
28b2977be9 Atomic operations: Add function declarations at the top of the header
No functional changes, just helps grasping what operations are actually
supported.
2015-05-20 11:57:17 +05:00
Sergey Sharybin
18d08ede22 Fixes for atomic operations when building with MSVC 2014-12-02 16:38:09 +05:00
32f83a298c Fix build errors in atomic ops and warning in aligned malloc on OS X. 2014-09-25 23:59:38 +02:00
Sergey Sharybin
37f3843ab0 Atomics: Add CAS (compare-and-swap) functions 2014-09-26 00:33:04 +06:00
Matteo F. Vescovi
c3f09c06cb Fix atomix operations on unofficial 64bit archs 2014-07-25 12:26:10 +06:00
Matteo F. Vescovi
4b2c826178 Fix compilation on unofficial 64bit archs 2014-06-02 16:27:09 +06:00
Sergey Sharybin
abb7e9f09b Attempt to fix compilation error on Debian armel kernel 2013-12-12 17:33:36 +06:00
Brecht Van Lommel
4bcccc24c1 Fix OS X compile error after enabling strict build flags for this module. 2013-09-01 14:10:41 +00:00
Campbell Barton
20fdea918d code cleanup: confirm include guards to our convention 2013-08-19 14:40:16 +00:00
Sergey Sharybin
cbfd2a8e62 Apparently sizeof(unsigned) is 4 bytes on both 32 and 64 bit platforms
For now assume sizeof(int) == 4 for all supported platforms, could be
changed in the future.

Added an assert to functions which depends on this this, so we'll
easily notice bad things happening.
2013-08-19 14:03:44 +00:00
Sergey Sharybin
499ccf731b Forgot this in previous commit
Solves compilation issues on Win and OSX

--
svn merge -r59180:59181 ^/branches/soc-2013-depsgraph_mt
2013-08-19 10:53:10 +00:00
Sergey Sharybin
c0f8e15295 Speedup for guarded allocator
- Re-arrange locks, so no actual memory allocation
  (which is relatively slow) happens from inside
  the lock. operation system will take care of locks
  which might be needed there on it's own.

- Use spin lock instead of mutex, since it's just
  list operations happens from inside lock, no need
  in mutex here.

- Use atomic operations for memory in use and total
  used blocks counters.

This makes guarded allocator almost the same speed
as non-guarded one in files from Tube project.

There're still MemHead/MemTail overhead which might
be bad for CPU cache utilization
2013-08-19 10:51:40 +00:00
Sergey Sharybin
efa836531e Commit atomic operations file
Not currently used, but needed for some further changes
2013-08-19 10:44:18 +00:00