Behdad Esfahbod
e36cd1dfd3
Remove trivial HB_ATOMIC_INT_INIT()
7 years ago
Bruce Mitchener
8a0952db7e
atomics: Favor compiler primitives over macOS APIs. ( #676 )
...
In macOS 10.12, the `OSMemoryBarrier` and related APIs were deprecated
in favor of using `std::atomic`. On the way to supporting `std::atomic`,
we can favor using the "Intel primitives" which are also available on
macOS.
7 years ago
Behdad Esfahbod
42d518513c
Towards compiling with pre-C++11 compilers and nullptr fallback
...
https://github.com/behdad/harfbuzz/issues/585
7 years ago
Behdad Esfahbod
1817221620
Minor
8 years ago
Behdad Esfahbod
49e72634af
Limit use of AIX intrinsics to IBM's compiler
9 years ago
Behdad Esfahbod
70b33edae7
Add atomic ops for AIX
...
Patch from Volker Simonis.
9 years ago
Behdad Esfahbod
9c974360fe
Minor rename
10 years ago
Behdad Esfahbod
2958f2c147
Fixup
10 years ago
Konstantin Ritt
3f174cd020
Minor refactoring to the atomics implementation
...
s/atomic_int/atomic_int_impl/ and s/atomic_ptr/atomic_ptr_impl/
to bring it in par with hb_mutex_impl_t, then re-introduce
hb_atomic_int_t as a wrapper around hb_atomic_int_impl_t.
In hb_reference_count_t, make it clear the non-atomic get and set
are intentional due to nature of the cases they are used in
(comparison to -1 and the debug output/tracing).
10 years ago
Behdad Esfahbod
45a8b46f47
Allow implementing atomic and mutex ops in config
...
Motivated by
https://github.com/behdad/harfbuzz/pull/92
10 years ago
Behdad Esfahbod
db30828048
[win] Consolidate windows.h include tips and tricks
10 years ago
Behdad Esfahbod
f26d59d468
More fixing MemoryBarrier() on Mingw32
...
Set requested windows header to Vista. See discussion:
fbb2847f54 (commitcomment-7054700)
10 years ago
Primiano Tucci
05870ed62e
Use __aarch64__ for 64-bit ARM detection, not __arm64__
...
Many GCC versions don't define __arm64__
11 years ago
Behdad Esfahbod
fbb2847f54
Improve MemoryBarrier() implementation
...
See thread "[HarfBuzz] compilation error of 0.9.26 with MinGW"
started by Werner.
11 years ago
Behdad Esfahbod
0bb31e4497
Bug 71845 - Use 64-bit cmpexch on ARM64 iOS
11 years ago
Behdad Esfahbod
1f97060985
Put back MemoryBarrier fallback implementation on MINGW32
...
This almost reverts 2761e8a632
,
but only if under MINGW32, so it doesn't affect MSVC.
12 years ago
Behdad Esfahbod
2761e8a632
[win32] Remove MemoryBarrier() fallback implementation
...
I added these because the older mingw32 toolchain didn't have
MemoryBarrier(). The newer mingw-w64 toolchain however has.
As reported by John Emmas this was causing build failure with
MSVC (on glib) because of inline issues. But that reminded me
that we may be taking this path even if the system implements
MemoryBarrier as a function, which is a waste. So, just remove
it.
12 years ago
Behdad Esfahbod
a6c1e040e5
Improve check for Windows platforms
...
Instead of checking for compiler, check for platform.
12 years ago
Behdad Esfahbod
b842780138
Minor
12 years ago
Behdad Esfahbod
de649f07f1
Fix residuals from fontconfig changes
12 years ago
Behdad Esfahbod
2dcb333f52
Add atomic ops for Solaris
...
Based on fontconfig patch from Raimund Steger.
12 years ago
Behdad Esfahbod
11d2956553
Minor
12 years ago
Behdad Esfahbod
0e9f0f3e5f
Fix atomic ops on iOS
...
Patch from John Ralls.
12 years ago
Behdad Esfahbod
071d5b831e
Work around missing OSAtomicCompareAndSwapPtrBarrier() on OS X 10.4
...
Not sure how to handle iOS.
12 years ago
Behdad Esfahbod
0e292eb2a2
Remove Glib thread-safety support
...
Now that we have pthread detection in configure, we don't need Glib
anymore. Glib will only be a Unicode data provider.
12 years ago
Behdad Esfahbod
52ff2681d8
Use VisualStudio-style atomic intrinsics on mingw32
12 years ago
Behdad Esfahbod
fa2bd9fb63
Further simplify atomic ops on Visual Studio
13 years ago
Behdad Esfahbod
391f1ff5d8
Fix _InterlockedCompareExchangePointer on x86
13 years ago
Behdad Esfahbod
12f5c0a222
Fix check for Intel atomic ops
13 years ago
Behdad Esfahbod
4a3a9897b3
Disable Intel atomic ops on mingw32
...
Apparently the configure test is not enough...
13 years ago
Behdad Esfahbod
0594a24484
Cleanup TRUE/FALSE vs true/false
13 years ago
Behdad Esfahbod
04bc1eebe7
Add configure tests for Intel atomic intrinsics
13 years ago
Behdad Esfahbod
6843ce01be
Add atomic-pointer functions
...
Gonig to use these for lock-free linked-lists, to be used for
hb_language_t among other things.
13 years ago
Behdad Esfahbod
cdafe3a7d8
Add gcc intrinsics implementations for atomic and mutex
13 years ago
Behdad Esfahbod
d970d2899b
Add gcc implementation for atomic ops
13 years ago
Behdad Esfahbod
0558d55bac
Remove hb_atomic_int_set/get()
...
We never use them in fact...
I'm just adjusting these as I better understand the requirements of
the code and the guarantees of each operation.
13 years ago
Behdad Esfahbod
a3547330fa
Cleanup atomic ops on OS X
13 years ago
Behdad Esfahbod
819faa0530
Minor
13 years ago
Behdad Esfahbod
303d5850ec
Fix Windows atomic get/set
...
According to:
http://msdn.microsoft.com/en-us/library/65tt87y8.aspx
MemoryBarrier() is the right macro to protect these, not _ReadBarrier()
and/or _WriteBarrier().
13 years ago
Behdad Esfahbod
cde1c0114b
Fix hb_atomic_int_set() implementation for HB_NO_MT
...
As pointed out by Jonathan Kew.
13 years ago
Behdad Esfahbod
bd908b4f10
Implement hb_atomic_int_set() for OS X
13 years ago
Behdad Esfahbod
022a05ae90
Minor
13 years ago
Behdad Esfahbod
22afd66a30
Add hb_atomic_int_set() again
13 years ago
Behdad Esfahbod
34961e3198
Prefer native atomic/mutex ops to glib's
13 years ago
Behdad Esfahbod
ec3ba4b96f
Move atomic ops into their own header
13 years ago