Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Apr 2, 2021
1 parent 46df3d6 commit 51c9af9
Showing 1 changed file with 25 additions and 35 deletions.
60 changes: 25 additions & 35 deletions base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1914,25 +1914,25 @@ optimized to the appropriate hardware instruction, otherwise it'll use a loop.
"""
modifyfield!

#"""
# Core.cmpswapfield!(value, name::Symbol, cmp, expected, desired,
# [success_order::Symbol, [fail_order::Symbol=success_order]) =>
# (old, Bool)
#
#These atomically perform the operations to get and conditionally set a field to
#a given value.
#
# y = getfield!(value, name, fail_order)
# ok = cmp(y, expected)
# if ok
# setfield!(value, name, desired, success_order)
# end
# return y, ok
#
#If the operation is `===` on a supported type, we'll use the relevant processor
#instructions, otherwise it'll use a loop.
#"""
#Core.cmpswapfield!
"""
cmpswapfield!(value, name::Symbol, cmp, expected, desired,
[success_order::Symbol, [fail_order::Symbol=success_order]) =>
(old, Bool)
These atomically perform the operations to get and conditionally set a field to
a given value.
y = getfield!(value, name, fail_order)
ok = cmp(y, expected)
if ok
setfield!(value, name, desired, success_order)
end
return y, ok
If the operation is `===` on a supported type, we'll use the relevant processor
instructions, otherwise it'll use a loop.
"""
cmpswapfield!

"""
typeof(x)
Expand Down Expand Up @@ -2527,8 +2527,11 @@ typeassert

"""
getproperty(value, name::Symbol)
getproperty(value, name::Symbol, order::Symbol)
The syntax `a.b` calls `getproperty(a, :b)`.
The syntax `@atomic order a.b` calls `getproperty(a, :b, :order)` and
the syntax `@atomic a.b` calls `getproperty(a, :b, :sequentially_consistent)`.
# Examples
```jldoctest
Expand Down Expand Up @@ -2561,31 +2564,18 @@ Base.getproperty

"""
setproperty!(value, name::Symbol, x)
setproperty!(value, name::Symbol, x, order::Symbol)
The syntax `a.b = c` calls `setproperty!(a, :b, c)`.
The syntax `@atomic order a.b = c` calls `setproperty!(a, :b, c, :order)`
and the syntax `@atomic a.b = c` calls `getproperty(a, :b, :sequentially_consistent)`.
See also [`setfield!`](@ref Core.setfield!),
[`propertynames`](@ref Base.propertynames) and
[`getproperty`](@ref Base.getproperty).
"""
Base.setproperty!

"""
getproperty(value, name::Symbol, order::Symbol)
The syntax `@atomic order a.b` calls `getproperty(a, :b, :order)` and
the syntax `@atomic a.b` calls `getproperty(a, :b, :sequentially_consistent)`.
"""
Base.getproperty

"""
setproperty!(value, name::Symbol, x, order::Symbol)
The syntax `@atomic order a.b = c` calls `setproperty!(a, :b, c, :order)`
and the syntax `@atomic a.b = c` calls `getproperty(a, :b, :sequentially_consistent)`.
"""
Base.setproperty!

"""
swapproperty!(x, f::Symbol, v, order::Symbol=:notatomic)
Expand Down

0 comments on commit 51c9af9

Please sign in to comment.