Functions
clear(p) → {undefined}
Sets the head of pair
p
to
false
. Returns undefined
.
This is an atomic operation.
Parameters:
Name | Type | Description |
---|---|---|
p |
array | given pair |
Returns:
undefined
- Type
- undefined
concurrent_execute() → {undefined}
Setup multiple threads for concurrent execution. For each
function
f_i
,
setup a thread t_i
that executes the body of
f_i
. Any parameters of f_i
refer
to undefined
during execution.
The thread that called concurrent_execute
runs concurrently with all t_i
. Returns
undefined
. This is an atomic operation.
Parameters:
Name | Type | Description |
---|---|---|
f_1,f_2,...,f_n |
function | given functions |
Returns:
undefined
- Type
- undefined
test_and_set(p) → {value}
Assumes the head of pair
p
is a boolean
b
. Sets the head of p
to
true
. Returns b
. This is an
atomic operation.
Parameters:
Name | Type | Description |
---|---|---|
p |
array | given pair |
Returns:
- head of pair
b
- Type
- value