Resguardo inicial

This commit is contained in:
lastdragon
2026-09-06 12:53:21 -06:00
parent 662efe3c2a
commit ad2088d178
94853 changed files with 43200404 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic add with ${desc_order} ordering
* @i: ${int} value to add
* @v: pointer to ${atomic}_t
*
* Atomically updates @v to (@v + @i) with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* ${desc_return}
*/
EOF
@@ -0,0 +1,13 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic add and test if negative with ${desc_order} ordering
* @i: ${int} value to add
* @v: pointer to ${atomic}_t
*
* Atomically updates @v to (@v + @i) with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* Return: @true if the resulting value of @v is negative, @false otherwise.
*/
EOF
@@ -0,0 +1,19 @@
if [ -z "${pfx}" ]; then
desc_return="Return: @true if @v was updated, @false otherwise."
fi
cat <<EOF
/**
* ${class}${atomicname}() - atomic add unless value with ${desc_order} ordering
* @v: pointer to ${atomic}_t
* @a: ${int} value to add
* @u: ${int} value to compare with
*
* If (@v != @u), atomically updates @v to (@v + @a) with ${desc_order} ordering.
* Otherwise, @v is not modified and relaxed ordering is provided.
*
* ${desc_noinstr}
*
* ${desc_return}
*/
EOF
+13
View File
@@ -0,0 +1,13 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic bitwise AND with ${desc_order} ordering
* @i: ${int} value
* @v: pointer to ${atomic}_t
*
* Atomically updates @v to (@v & @i) with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* ${desc_return}
*/
EOF
@@ -0,0 +1,13 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic bitwise AND NOT with ${desc_order} ordering
* @i: ${int} value
* @v: pointer to ${atomic}_t
*
* Atomically updates @v to (@v & ~@i) with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* ${desc_return}
*/
EOF
@@ -0,0 +1,15 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic compare and exchange with ${desc_order} ordering
* @v: pointer to ${atomic}_t
* @old: ${int} value to compare with
* @new: ${int} value to assign
*
* If (@v == @old), atomically updates @v to @new with ${desc_order} ordering.
* Otherwise, @v is not modified and relaxed ordering is provided.
*
* ${desc_noinstr}
*
* Return: The original value of @v.
*/
EOF
+12
View File
@@ -0,0 +1,12 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic decrement with ${desc_order} ordering
* @v: pointer to ${atomic}_t
*
* Atomically updates @v to (@v - 1) with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* ${desc_return}
*/
EOF
@@ -0,0 +1,12 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic decrement and test if zero with ${desc_order} ordering
* @v: pointer to ${atomic}_t
*
* Atomically updates @v to (@v - 1) with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* Return: @true if the resulting value of @v is zero, @false otherwise.
*/
EOF
@@ -0,0 +1,13 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic decrement if positive with ${desc_order} ordering
* @v: pointer to ${atomic}_t
*
* If (@v > 0), atomically updates @v to (@v - 1) with ${desc_order} ordering.
* Otherwise, @v is not modified and relaxed ordering is provided.
*
* ${desc_noinstr}
*
* Return: The old value of (@v - 1), regardless of whether @v was updated.
*/
EOF
@@ -0,0 +1,13 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic decrement unless positive with ${desc_order} ordering
* @v: pointer to ${atomic}_t
*
* If (@v <= 0), atomically updates @v to (@v - 1) with ${desc_order} ordering.
* Otherwise, @v is not modified and relaxed ordering is provided.
*
* ${desc_noinstr}
*
* Return: @true if @v was updated, @false otherwise.
*/
EOF
+12
View File
@@ -0,0 +1,12 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic increment with ${desc_order} ordering
* @v: pointer to ${atomic}_t
*
* Atomically updates @v to (@v + 1) with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* ${desc_return}
*/
EOF
@@ -0,0 +1,12 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic increment and test if zero with ${desc_order} ordering
* @v: pointer to ${atomic}_t
*
* Atomically updates @v to (@v + 1) with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* Return: @true if the resulting value of @v is zero, @false otherwise.
*/
EOF
@@ -0,0 +1,13 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic increment unless zero with ${desc_order} ordering
* @v: pointer to ${atomic}_t
*
* If (@v != 0), atomically updates @v to (@v + 1) with ${desc_order} ordering.
* Otherwise, @v is not modified and relaxed ordering is provided.
*
* ${desc_noinstr}
*
* Return: @true if @v was updated, @false otherwise.
*/
EOF
@@ -0,0 +1,13 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic increment unless negative with ${desc_order} ordering
* @v: pointer to ${atomic}_t
*
* If (@v >= 0), atomically updates @v to (@v + 1) with ${desc_order} ordering.
* Otherwise, @v is not modified and relaxed ordering is provided.
*
* ${desc_noinstr}
*
* Return: @true if @v was updated, @false otherwise.
*/
EOF
+13
View File
@@ -0,0 +1,13 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic bitwise OR with ${desc_order} ordering
* @i: ${int} value
* @v: pointer to ${atomic}_t
*
* Atomically updates @v to (@v | @i) with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* ${desc_return}
*/
EOF
+12
View File
@@ -0,0 +1,12 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic load with ${desc_order} ordering
* @v: pointer to ${atomic}_t
*
* Atomically loads the value of @v with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* Return: The value loaded from @v.
*/
EOF
+13
View File
@@ -0,0 +1,13 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic set with ${desc_order} ordering
* @v: pointer to ${atomic}_t
* @i: ${int} value to assign
*
* Atomically sets @v to @i with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* Return: Nothing.
*/
EOF
+13
View File
@@ -0,0 +1,13 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic subtract with ${desc_order} ordering
* @i: ${int} value to subtract
* @v: pointer to ${atomic}_t
*
* Atomically updates @v to (@v - @i) with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* ${desc_return}
*/
EOF
@@ -0,0 +1,13 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic subtract and test if zero with ${desc_order} ordering
* @i: ${int} value to subtract
* @v: pointer to ${atomic}_t
*
* Atomically updates @v to (@v - @i) with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* Return: @true if the resulting value of @v is zero, @false otherwise.
*/
EOF
@@ -0,0 +1,16 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic compare and exchange with ${desc_order} ordering
* @v: pointer to ${atomic}_t
* @old: pointer to ${int} value to compare with
* @new: ${int} value to assign
*
* If (@v == @old), atomically updates @v to @new with ${desc_order} ordering.
* Otherwise, @v is not modified, @old is updated to the current value of @v,
* and relaxed ordering is provided.
*
* ${desc_noinstr}
*
* Return: @true if the exchange occurred, @false otherwise.
*/
EOF
+13
View File
@@ -0,0 +1,13 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic exchange with ${desc_order} ordering
* @v: pointer to ${atomic}_t
* @new: ${int} value to assign
*
* Atomically updates @v to @new with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* Return: The original value of @v.
*/
EOF
+13
View File
@@ -0,0 +1,13 @@
cat <<EOF
/**
* ${class}${atomicname}() - atomic bitwise XOR with ${desc_order} ordering
* @i: ${int} value
* @v: pointer to ${atomic}_t
*
* Atomically updates @v to (@v ^ @i) with ${desc_order} ordering.
*
* ${desc_noinstr}
*
* ${desc_return}
*/
EOF