Skip to content

Commit

Permalink
Document atomic-(inc|dec)-fetch, aka ++βš› and --βš›
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Dec 20, 2017
1 parent bce40f1 commit abbd0c9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions doc/Type/atomicint.pod6
Expand Up @@ -137,6 +137,24 @@ too big to unbox to a 64-bit integer, an exception will be thrown. If C<$value>
otherwise overflows C<atomicint> then it will be silently truncated before the
subtraction is performed.
=head2 sub atomic-inc-fetch
multi sub atomic-inc--fetch(atomicint $ is rw)
Performs an atomic increment on a native integer. This will be performed using
hardware-provided atomic operations. Since the operation is atomic, it is safe
to use without acquiring a lock. Returns the value resulting from the
increment. Overflow will wrap around silently.
=head2 sub atomic-dec-fetch
multi sub atomic-dec--fetch(atomicint $ is rw)
Performs an atomic decrement on a native integer. This will be performed using
hardware-provided atomic operations. Since the operation is atomic, it is safe
to use without acquiring a lock. Returns the value resulting from the
decrement. Overflow will wrap around silently.
=head2 sub cas
Defined as:
Expand Down

0 comments on commit abbd0c9

Please sign in to comment.