diff options
author | Rickard Green <[email protected]> | 2012-02-29 20:10:37 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2012-02-29 20:10:37 +0100 |
commit | 3750ac230e0af600417fff900b3d5ef242fb18c7 (patch) | |
tree | b9c56b3d7a681bcf0441e4bb2adf48da3cc8656e /erts/lib_src/utils/make_atomics_api | |
parent | eda0a2d866060b18af6f06abbc9ea9e920de43b7 (diff) | |
parent | b8e572a1d755e5b90dfc9aedb49e21862376ea7d (diff) | |
download | otp-3750ac230e0af600417fff900b3d5ef242fb18c7.tar.gz otp-3750ac230e0af600417fff900b3d5ef242fb18c7.tar.bz2 otp-3750ac230e0af600417fff900b3d5ef242fb18c7.zip |
Merge branch 'rickard/barriers/OTP-9922' into maint
* rickard/barriers/OTP-9922:
Fix implementation with ddrb barriers
Diffstat (limited to 'erts/lib_src/utils/make_atomics_api')
-rwxr-xr-x | erts/lib_src/utils/make_atomics_api | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/erts/lib_src/utils/make_atomics_api b/erts/lib_src/utils/make_atomics_api index d8b1a56100..75e88f8a7e 100755 --- a/erts/lib_src/utils/make_atomics_api +++ b/erts/lib_src/utils/make_atomics_api @@ -805,17 +805,17 @@ rtchk_fallback_call(Return, #atomic_context{dw = DW, non_native_barrier(B) -> lists:member(B, ?NON_NATIVE_BARRIERS). -non_native_barrier_impl(AC, Type, Macro, Op, B) -> +non_native_barrier_impl(AC, Type, Op, B) -> [" -", func_header(AC, Type, Macro, Op, B), " +", func_header(AC, Type, false, Op, B), " {", case B of ddrb -> [" #ifdef ETHR_ORDERED_READ_DEPEND - ", func_call(AC, Type, Macro, Op, none, true), " + ", func_call(AC, Type, Op, none, true), " #else - ", func_call(AC, Type, Macro, Op, rb, true), " + ", func_call(AC, Type, Op, rb, true), " #endif " ] @@ -824,12 +824,10 @@ non_native_barrier_impl(AC, Type, Macro, Op, B) -> " ]. -func_call(#atomic_context{'ATMC' = ATMC} = AC, inline_implementation, _Macro, Op, B, RetStatement) -> +func_call(#atomic_context{'ATMC' = ATMC} = AC, inline_implementation, Op, B, RetStatement) -> func_call(AC, Op, ["ETHR_", ATMC, "_FUNC__(", opstr(Op), op_barrier_ext(B), ")"], RetStatement); -func_call(#atomic_context{atomic = Atomic} = AC, implementation, false, Op, B, RetStatement) -> - func_call(AC, Op, [Atomic, "_", opstr(Op), op_barrier_ext(B)], RetStatement); -func_call(AC, implementation, Macro, Op, B, RetStatement) -> - func_call(AC, Op, [Macro, "(", opstr(Op), op_barrier_ext(B), ")"], RetStatement). +func_call(#atomic_context{atomic = Atomic} = AC, implementation, Op, B, RetStatement) -> + func_call(AC, Op, [Atomic, "_", opstr(Op), op_barrier_ext(B)], RetStatement). func_call(#atomic_context{dw = DW, arg1 = Arg1, arg2 = Arg2, arg3 = Arg3} = AC, Op, Func, true) -> op_call(Op, DW, case is_return_op(AC, Op) of @@ -901,7 +899,7 @@ make_implementations(#atomic_context{dw = DW, lists:map(fun (B) -> case non_native_barrier(B) of true -> - non_native_barrier_impl(AC, inline_implementation, false, Op, B); + non_native_barrier_impl(AC, inline_implementation, Op, B); false -> TryBarriers = try_barrier_order(B), [" @@ -1211,7 +1209,7 @@ int ethr_have_native_dw_atomic(void) end, case non_native_barrier(B) of true -> - non_native_barrier_impl(AC, implementation, Macro, Op, B); + non_native_barrier_impl(AC, implementation, Op, B); false -> ["\n", func_header(AC, implementation, Macro, Op, B), |