Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert caml_atomic_cas primitive name #3518

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/cmm_helpers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4238,7 +4238,7 @@ let atomic_lxor ~dbg atomic i =
let atomic_compare_and_set_extcall ~dbg atomic ~old_value ~new_value =
Cop
( Cextcall
{ func = "caml_atomic_compare_set";
{ func = "caml_atomic_cas";
builtin = false;
returns = true;
effects = Arbitrary_effects;
Expand Down
2 changes: 1 addition & 1 deletion bytecomp/bytegen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ let comp_primitive stack_info p sz args =
| Patomic_set _
| Patomic_exchange _ -> Kccall("caml_atomic_exchange", 2)
| Patomic_compare_exchange _ -> Kccall("caml_atomic_compare_exchange", 3)
| Patomic_compare_set _ -> Kccall("caml_atomic_compare_set", 3)
| Patomic_compare_set _ -> Kccall("caml_atomic_cas", 3)
| Patomic_fetch_add -> Kccall("caml_atomic_fetch_add", 2)
| Patomic_add -> Kccall("caml_atomic_add", 2)
| Patomic_sub -> Kccall("caml_atomic_sub", 2)
Expand Down
2 changes: 1 addition & 1 deletion runtime/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ CAMLprim value caml_atomic_compare_exchange (value ref, value oldv, value newv)
}
}

CAMLprim value caml_atomic_compare_set (value ref, value oldv, value newv)
CAMLprim value caml_atomic_cas (value ref, value oldv, value newv)
{
if (caml_atomic_compare_exchange(ref, oldv, newv) == oldv) {
return Val_true;
Expand Down
2 changes: 1 addition & 1 deletion runtime4/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ CAMLprim value caml_atomic_compare_exchange(value ref, value oldv, value newv)
}
}

CAMLprim value caml_atomic_compare_set(value ref, value oldv, value newv)
CAMLprim value caml_atomic_cas(value ref, value oldv, value newv)
{
if (caml_atomic_compare_exchange(ref, oldv, newv) == oldv) {
return Val_true;
Expand Down
Loading