gem5  v20.1.0.0
Classes | Typedefs | Enumerations | Functions
Signals

Classes

struct  hsa_signal_s
 Signal handle. More...
 
struct  hsa_signal_group_s
 Group of signals. More...
 

Typedefs

typedef struct hsa_signal_s hsa_signal_t
 Signal handle. More...
 
typedef int32_t hsa_signal_value_t
 Signal value. More...
 
typedef struct hsa_signal_group_s hsa_signal_group_t
 Group of signals. More...
 

Enumerations

enum  hsa_signal_condition_t { HSA_SIGNAL_CONDITION_EQ = 0, HSA_SIGNAL_CONDITION_NE = 1, HSA_SIGNAL_CONDITION_LT = 2, HSA_SIGNAL_CONDITION_GTE = 3 }
 Wait condition operator. More...
 
enum  hsa_wait_state_t { HSA_WAIT_STATE_BLOCKED = 0, HSA_WAIT_STATE_ACTIVE = 1 }
 State of the application thread during a signal wait. More...
 

Functions

hsa_status_t HSA_API hsa_signal_create (hsa_signal_value_t initial_value, uint32_t num_consumers, const hsa_agent_t *consumers, hsa_signal_t *signal)
 Create a signal. More...
 
hsa_status_t HSA_API hsa_signal_destroy (hsa_signal_t signal)
 Destroy a signal previous created by hsa_signal_create. More...
 
hsa_signal_value_t HSA_API hsa_signal_load_scacquire (hsa_signal_t signal)
 Atomically read the current value of a signal. More...
 
hsa_signal_value_t HSA_API hsa_signal_load_relaxed (hsa_signal_t signal)
 Atomically read the current value of a signal. More...
 
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_load_acquire (hsa_signal_t signal)
 Atomically read the current value of a signal. More...
 
void HSA_API hsa_signal_store_relaxed (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically set the value of a signal. More...
 
void HSA_API hsa_signal_store_screlease (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically set the value of a signal. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_store_release (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically set the value of a signal. More...
 
void HSA_API hsa_signal_silent_store_relaxed (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically set the value of a signal without necessarily notifying the the agents waiting on it. More...
 
void HSA_API hsa_signal_silent_store_screlease (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically set the value of a signal without necessarily notifying the the agents waiting on it. More...
 
hsa_signal_value_t HSA_API hsa_signal_exchange_scacq_screl (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically set the value of a signal and return its previous value. More...
 
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_exchange_acq_rel (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically set the value of a signal and return its previous value. More...
 
hsa_signal_value_t HSA_API hsa_signal_exchange_scacquire (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically set the value of a signal and return its previous value. More...
 
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_exchange_acquire (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically set the value of a signal and return its previous value. More...
 
hsa_signal_value_t HSA_API hsa_signal_exchange_relaxed (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically set the value of a signal and return its previous value. More...
 
hsa_signal_value_t HSA_API hsa_signal_exchange_screlease (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically set the value of a signal and return its previous value. More...
 
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_exchange_release (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically set the value of a signal and return its previous value. More...
 
hsa_signal_value_t HSA_API hsa_signal_cas_scacq_screl (hsa_signal_t signal, hsa_signal_value_t expected, hsa_signal_value_t value)
 Atomically set the value of a signal if the observed value is equal to the expected value. More...
 
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_cas_acq_rel (hsa_signal_t signal, hsa_signal_value_t expected, hsa_signal_value_t value)
 Atomically set the value of a signal if the observed value is equal to the expected value. More...
 
hsa_signal_value_t HSA_API hsa_signal_cas_scacquire (hsa_signal_t signal, hsa_signal_value_t expected, hsa_signal_value_t value)
 Atomically set the value of a signal if the observed value is equal to the expected value. More...
 
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_cas_acquire (hsa_signal_t signal, hsa_signal_value_t expected, hsa_signal_value_t value)
 Atomically set the value of a signal if the observed value is equal to the expected value. More...
 
hsa_signal_value_t HSA_API hsa_signal_cas_relaxed (hsa_signal_t signal, hsa_signal_value_t expected, hsa_signal_value_t value)
 Atomically set the value of a signal if the observed value is equal to the expected value. More...
 
hsa_signal_value_t HSA_API hsa_signal_cas_screlease (hsa_signal_t signal, hsa_signal_value_t expected, hsa_signal_value_t value)
 Atomically set the value of a signal if the observed value is equal to the expected value. More...
 
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_cas_release (hsa_signal_t signal, hsa_signal_value_t expected, hsa_signal_value_t value)
 Atomically set the value of a signal if the observed value is equal to the expected value. More...
 
void HSA_API hsa_signal_add_scacq_screl (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically increment the value of a signal by a given amount. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_add_acq_rel (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically increment the value of a signal by a given amount. More...
 
void HSA_API hsa_signal_add_scacquire (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically increment the value of a signal by a given amount. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_add_acquire (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically increment the value of a signal by a given amount. More...
 
void HSA_API hsa_signal_add_relaxed (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically increment the value of a signal by a given amount. More...
 
void HSA_API hsa_signal_add_screlease (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically increment the value of a signal by a given amount. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_add_release (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically increment the value of a signal by a given amount. More...
 
void HSA_API hsa_signal_subtract_scacq_screl (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically decrement the value of a signal by a given amount. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_subtract_acq_rel (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically decrement the value of a signal by a given amount. More...
 
void HSA_API hsa_signal_subtract_scacquire (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically decrement the value of a signal by a given amount. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_subtract_acquire (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically decrement the value of a signal by a given amount. More...
 
void HSA_API hsa_signal_subtract_relaxed (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically decrement the value of a signal by a given amount. More...
 
void HSA_API hsa_signal_subtract_screlease (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically decrement the value of a signal by a given amount. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_subtract_release (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically decrement the value of a signal by a given amount. More...
 
void HSA_API hsa_signal_and_scacq_screl (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise AND operation between the value of a signal and a given value. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_and_acq_rel (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise AND operation between the value of a signal and a given value. More...
 
void HSA_API hsa_signal_and_scacquire (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise AND operation between the value of a signal and a given value. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_and_acquire (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise AND operation between the value of a signal and a given value. More...
 
void HSA_API hsa_signal_and_relaxed (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise AND operation between the value of a signal and a given value. More...
 
void HSA_API hsa_signal_and_screlease (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise AND operation between the value of a signal and a given value. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_and_release (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise AND operation between the value of a signal and a given value. More...
 
void HSA_API hsa_signal_or_scacq_screl (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise OR operation between the value of a signal and a given value. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_or_acq_rel (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise OR operation between the value of a signal and a given value. More...
 
void HSA_API hsa_signal_or_scacquire (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise OR operation between the value of a signal and a given value. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_or_acquire (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise OR operation between the value of a signal and a given value. More...
 
void HSA_API hsa_signal_or_relaxed (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise OR operation between the value of a signal and a given value. More...
 
void HSA_API hsa_signal_or_screlease (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise OR operation between the value of a signal and a given value. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_or_release (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise OR operation between the value of a signal and a given value. More...
 
void HSA_API hsa_signal_xor_scacq_screl (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise XOR operation between the value of a signal and a given value. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_xor_acq_rel (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise XOR operation between the value of a signal and a given value. More...
 
void HSA_API hsa_signal_xor_scacquire (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise XOR operation between the value of a signal and a given value. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_xor_acquire (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise XOR operation between the value of a signal and a given value. More...
 
void HSA_API hsa_signal_xor_relaxed (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise XOR operation between the value of a signal and a given value. More...
 
void HSA_API hsa_signal_xor_screlease (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise XOR operation between the value of a signal and a given value. More...
 
void HSA_API HSA_DEPRECATED hsa_signal_xor_release (hsa_signal_t signal, hsa_signal_value_t value)
 Atomically perform a bitwise XOR operation between the value of a signal and a given value. More...
 
hsa_signal_value_t HSA_API hsa_signal_wait_scacquire (hsa_signal_t signal, hsa_signal_condition_t condition, hsa_signal_value_t compare_value, uint64_t timeout_hint, hsa_wait_state_t wait_state_hint)
 Wait until a signal value satisfies a specified condition, or a certain amount of time has elapsed. More...
 
hsa_signal_value_t HSA_API hsa_signal_wait_relaxed (hsa_signal_t signal, hsa_signal_condition_t condition, hsa_signal_value_t compare_value, uint64_t timeout_hint, hsa_wait_state_t wait_state_hint)
 Wait until a signal value satisfies a specified condition, or a certain amount of time has elapsed. More...
 
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_wait_acquire (hsa_signal_t signal, hsa_signal_condition_t condition, hsa_signal_value_t compare_value, uint64_t timeout_hint, hsa_wait_state_t wait_state_hint)
 Wait until a signal value satisfies a specified condition, or a certain amount of time has elapsed. More...
 
hsa_status_t HSA_API hsa_signal_group_create (uint32_t num_signals, const hsa_signal_t *signals, uint32_t num_consumers, const hsa_agent_t *consumers, hsa_signal_group_t *signal_group)
 Create a signal group. More...
 
hsa_status_t HSA_API hsa_signal_group_destroy (hsa_signal_group_t signal_group)
 Destroy a signal group previous created by hsa_signal_group_create. More...
 
hsa_status_t HSA_API hsa_signal_group_wait_any_scacquire (hsa_signal_group_t signal_group, const hsa_signal_condition_t *conditions, const hsa_signal_value_t *compare_values, hsa_wait_state_t wait_state_hint, hsa_signal_t *signal, hsa_signal_value_t *value)
 Wait until the value of at least one of the signals in a signal group satisfies its associated condition. More...
 
hsa_status_t HSA_API hsa_signal_group_wait_any_relaxed (hsa_signal_group_t signal_group, const hsa_signal_condition_t *conditions, const hsa_signal_value_t *compare_values, hsa_wait_state_t wait_state_hint, hsa_signal_t *signal, hsa_signal_value_t *value)
 Wait until the value of at least one of the signals in a signal group satisfies its associated condition. More...
 

Detailed Description

Typedef Documentation

◆ hsa_signal_group_t

Group of signals.

◆ hsa_signal_t

typedef struct hsa_signal_s hsa_signal_t

Signal handle.

◆ hsa_signal_value_t

typedef int32_t hsa_signal_value_t

Signal value.

The value occupies 32 bits in small machine mode, and 64 bits in large machine mode.

Definition at line 1302 of file hsa.h.

Enumeration Type Documentation

◆ hsa_signal_condition_t

Wait condition operator.

Enumerator
HSA_SIGNAL_CONDITION_EQ 

The two operands are equal.

HSA_SIGNAL_CONDITION_NE 

The two operands are not equal.

HSA_SIGNAL_CONDITION_LT 

The first operand is less than the second operand.

HSA_SIGNAL_CONDITION_GTE 

The first operand is greater than or equal to the second operand.

Definition at line 1910 of file hsa.h.

◆ hsa_wait_state_t

State of the application thread during a signal wait.

Enumerator
HSA_WAIT_STATE_BLOCKED 

The application thread may be rescheduled while waiting on the signal.

HSA_WAIT_STATE_ACTIVE 

The application thread stays active while waiting on a signal.

Definition at line 1932 of file hsa.h.

Function Documentation

◆ hsa_signal_add_acq_rel()

void HSA_API HSA_DEPRECATED hsa_signal_add_acq_rel ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically increment the value of a signal by a given amount.

Deprecated:
Renamed as hsa_signal_add_scacq_screl.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to add to the value of the signal.

◆ hsa_signal_add_acquire()

void HSA_API HSA_DEPRECATED hsa_signal_add_acquire ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically increment the value of a signal by a given amount.

Deprecated:
Renamed as hsa_signal_add_scacquire.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to add to the value of the signal.

◆ hsa_signal_add_relaxed()

void HSA_API hsa_signal_add_relaxed ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically increment the value of a signal by a given amount.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to add to the value of the signal.

◆ hsa_signal_add_release()

void HSA_API HSA_DEPRECATED hsa_signal_add_release ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically increment the value of a signal by a given amount.

Deprecated:
Renamed as hsa_signal_add_screlease.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to add to the value of the signal.

◆ hsa_signal_add_scacq_screl()

void HSA_API hsa_signal_add_scacq_screl ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically increment the value of a signal by a given amount.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to add to the value of the signal.

◆ hsa_signal_add_scacquire()

void HSA_API hsa_signal_add_scacquire ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically increment the value of a signal by a given amount.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to add to the value of the signal.

◆ hsa_signal_add_screlease()

void HSA_API hsa_signal_add_screlease ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically increment the value of a signal by a given amount.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to add to the value of the signal.

◆ hsa_signal_and_acq_rel()

void HSA_API HSA_DEPRECATED hsa_signal_and_acq_rel ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise AND operation between the value of a signal and a given value.

Deprecated:
Renamed as hsa_signal_and_scacq_screl.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to AND with the value of the signal.

◆ hsa_signal_and_acquire()

void HSA_API HSA_DEPRECATED hsa_signal_and_acquire ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise AND operation between the value of a signal and a given value.

Deprecated:
Renamed as hsa_signal_and_scacquire.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to AND with the value of the signal.

◆ hsa_signal_and_relaxed()

void HSA_API hsa_signal_and_relaxed ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise AND operation between the value of a signal and a given value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to AND with the value of the signal.

◆ hsa_signal_and_release()

void HSA_API HSA_DEPRECATED hsa_signal_and_release ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise AND operation between the value of a signal and a given value.

Deprecated:
Renamed as hsa_signal_and_screlease.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to AND with the value of the signal.

◆ hsa_signal_and_scacq_screl()

void HSA_API hsa_signal_and_scacq_screl ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise AND operation between the value of a signal and a given value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to AND with the value of the signal.

◆ hsa_signal_and_scacquire()

void HSA_API hsa_signal_and_scacquire ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise AND operation between the value of a signal and a given value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to AND with the value of the signal.

◆ hsa_signal_and_screlease()

void HSA_API hsa_signal_and_screlease ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise AND operation between the value of a signal and a given value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to AND with the value of the signal.

◆ hsa_signal_cas_acq_rel()

hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_cas_acq_rel ( hsa_signal_t  signal,
hsa_signal_value_t  expected,
hsa_signal_value_t  value 
)

Atomically set the value of a signal if the observed value is equal to the expected value.

Deprecated:
Renamed as hsa_signal_cas_scacq_screl.

The observed value is returned regardless of whether the replacement was done.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]expectedValue to compare with.
[in]valueNew value.
Returns
Observed value of the signal.

◆ hsa_signal_cas_acquire()

hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_cas_acquire ( hsa_signal_t  signal,
hsa_signal_value_t  expected,
hsa_signal_value_t  value 
)

Atomically set the value of a signal if the observed value is equal to the expected value.

Deprecated:
Renamed as hsa_signal_cas_scacquire.

The observed value is returned regardless of whether the replacement was done.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]expectedValue to compare with.
[in]valueNew value.
Returns
Observed value of the signal.

◆ hsa_signal_cas_relaxed()

hsa_signal_value_t HSA_API hsa_signal_cas_relaxed ( hsa_signal_t  signal,
hsa_signal_value_t  expected,
hsa_signal_value_t  value 
)

Atomically set the value of a signal if the observed value is equal to the expected value.

The observed value is returned regardless of whether the replacement was done.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]expectedValue to compare with.
[in]valueNew value.
Returns
Observed value of the signal.

◆ hsa_signal_cas_release()

hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_cas_release ( hsa_signal_t  signal,
hsa_signal_value_t  expected,
hsa_signal_value_t  value 
)

Atomically set the value of a signal if the observed value is equal to the expected value.

Deprecated:
Renamed as hsa_signal_cas_screlease.

The observed value is returned regardless of whether the replacement was done.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]expectedValue to compare with.
[in]valueNew value.
Returns
Observed value of the signal.

◆ hsa_signal_cas_scacq_screl()

hsa_signal_value_t HSA_API hsa_signal_cas_scacq_screl ( hsa_signal_t  signal,
hsa_signal_value_t  expected,
hsa_signal_value_t  value 
)

Atomically set the value of a signal if the observed value is equal to the expected value.

The observed value is returned regardless of whether the replacement was done.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]expectedValue to compare with.
[in]valueNew value.
Returns
Observed value of the signal.

◆ hsa_signal_cas_scacquire()

hsa_signal_value_t HSA_API hsa_signal_cas_scacquire ( hsa_signal_t  signal,
hsa_signal_value_t  expected,
hsa_signal_value_t  value 
)

Atomically set the value of a signal if the observed value is equal to the expected value.

The observed value is returned regardless of whether the replacement was done.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]expectedValue to compare with.
[in]valueNew value.
Returns
Observed value of the signal.

◆ hsa_signal_cas_screlease()

hsa_signal_value_t HSA_API hsa_signal_cas_screlease ( hsa_signal_t  signal,
hsa_signal_value_t  expected,
hsa_signal_value_t  value 
)

Atomically set the value of a signal if the observed value is equal to the expected value.

The observed value is returned regardless of whether the replacement was done.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]expectedValue to compare with.
[in]valueNew value.
Returns
Observed value of the signal.

◆ hsa_signal_create()

hsa_status_t HSA_API hsa_signal_create ( hsa_signal_value_t  initial_value,
uint32_t  num_consumers,
const hsa_agent_t consumers,
hsa_signal_t signal 
)

Create a signal.

Parameters
[in]initial_valueInitial value of the signal.
[in]num_consumersSize of consumers. A value of 0 indicates that any agent might wait on the signal.
[in]consumersList of agents that might consume (wait on) the signal. If num_consumers is 0, this argument is ignored; otherwise, the HSA runtime might use the list to optimize the handling of the signal object. If an agent not listed in consumers waits on the returned signal, the behavior is undefined. The memory associated with consumers can be reused or freed after the function returns.
[out]signalPointer to a memory location where the HSA runtime will store the newly created signal handle. Must not be NULL.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_OUT_OF_RESOURCESThe HSA runtime failed to allocate the required resources.
HSA_STATUS_ERROR_INVALID_ARGUMENTsignal is NULL, num_consumers is greater than 0 but consumers is NULL, or consumers contains duplicates.

◆ hsa_signal_destroy()

hsa_status_t HSA_API hsa_signal_destroy ( hsa_signal_t  signal)

Destroy a signal previous created by hsa_signal_create.

Parameters
[in]signalSignal.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_SIGNALsignal is invalid.
HSA_STATUS_ERROR_INVALID_ARGUMENTThe handle in signal is 0.

◆ hsa_signal_exchange_acq_rel()

hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_exchange_acq_rel ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically set the value of a signal and return its previous value.

Deprecated:
Renamed as hsa_signal_exchange_scacq_screl.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueNew value.
Returns
Value of the signal prior to the exchange.

◆ hsa_signal_exchange_acquire()

hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_exchange_acquire ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically set the value of a signal and return its previous value.

Deprecated:
Renamed as hsa_signal_exchange_scacquire.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueNew value.
Returns
Value of the signal prior to the exchange.

◆ hsa_signal_exchange_relaxed()

hsa_signal_value_t HSA_API hsa_signal_exchange_relaxed ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically set the value of a signal and return its previous value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueNew value.
Returns
Value of the signal prior to the exchange.

◆ hsa_signal_exchange_release()

hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_exchange_release ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically set the value of a signal and return its previous value.

Deprecated:
Renamed as hsa_signal_exchange_screlease.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueNew value.
Returns
Value of the signal prior to the exchange.

◆ hsa_signal_exchange_scacq_screl()

hsa_signal_value_t HSA_API hsa_signal_exchange_scacq_screl ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically set the value of a signal and return its previous value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueNew value.
Returns
Value of the signal prior to the exchange.

◆ hsa_signal_exchange_scacquire()

hsa_signal_value_t HSA_API hsa_signal_exchange_scacquire ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically set the value of a signal and return its previous value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueNew value.
Returns
Value of the signal prior to the exchange.

◆ hsa_signal_exchange_screlease()

hsa_signal_value_t HSA_API hsa_signal_exchange_screlease ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically set the value of a signal and return its previous value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueNew value.
Returns
Value of the signal prior to the exchange.

◆ hsa_signal_group_create()

hsa_status_t HSA_API hsa_signal_group_create ( uint32_t  num_signals,
const hsa_signal_t signals,
uint32_t  num_consumers,
const hsa_agent_t consumers,
hsa_signal_group_t signal_group 
)

Create a signal group.

Parameters
[in]num_signalsNumber of elements in signals. Must not be 0.
[in]signalsList of signals in the group. The list must not contain any repeated elements. Must not be NULL.
[in]num_consumersNumber of elements in consumers. Must not be 0.
[in]consumersList of agents that might consume (wait on) the signal group. The list must not contain repeated elements, and must be a subset of the set of agents that are allowed to wait on all the signals in the group. If an agent not listed in consumers waits on the returned group, the behavior is undefined. The memory associated with consumers can be reused or freed after the function returns. Must not be NULL.
[out]signal_groupPointer to newly created signal group. Must not be NULL.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_OUT_OF_RESOURCESThe HSA runtime failed to allocate the required resources.
HSA_STATUS_ERROR_INVALID_ARGUMENTnum_signals is 0, signals is NULL, num_consumers is 0, consumers is NULL, or signal_group is NULL.

◆ hsa_signal_group_destroy()

hsa_status_t HSA_API hsa_signal_group_destroy ( hsa_signal_group_t  signal_group)

Destroy a signal group previous created by hsa_signal_group_create.

Parameters
[in]signal_groupSignal group.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_SIGNAL_GROUPsignal_group is invalid.

◆ hsa_signal_group_wait_any_relaxed()

hsa_status_t HSA_API hsa_signal_group_wait_any_relaxed ( hsa_signal_group_t  signal_group,
const hsa_signal_condition_t conditions,
const hsa_signal_value_t compare_values,
hsa_wait_state_t  wait_state_hint,
hsa_signal_t signal,
hsa_signal_value_t value 
)

Wait until the value of at least one of the signals in a signal group satisfies its associated condition.

The function is guaranteed to return if the value of at least one of the signals in the group satisfies its associated condition at some point in time during the wait, but the signal value returned to the application may no longer satisfy the condition. The application must ensure that signals in the group are used in such way that wait wakeup conditions are not invalidated before dependent threads have woken up.

When this operation internally loads the value of the passed signal, it uses the memory order indicated in the function name.

Parameters
[in]signal_groupSignal group.
[in]conditionsList of conditions. Each condition, and the value at the same index in compare_values, is used to compare the value of the signal at that index in signal_group (the signal passed by the application to hsa_signal_group_create at that particular index). The size of conditions must not be smaller than the number of signals in signal_group; any extra elements are ignored. Must not be NULL.
[in]compare_valuesList of comparison values. The size of compare_values must not be smaller than the number of signals in signal_group; any extra elements are ignored. Must not be NULL.
[in]wait_state_hintHint used by the application to indicate the preferred waiting state. The actual waiting state is decided by the HSA runtime and may not match the provided hint. A value of HSA_WAIT_STATE_ACTIVE may improve the latency of response to a signal update by avoiding rescheduling overhead.
[out]signalSignal in the group that satisfied the associated condition. If several signals satisfied their condition, the function can return any of those signals. Must not be NULL.
[out]valueObserved value for signal, which might no longer satisfy the specified condition. Must not be NULL.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_INVALID_SIGNAL_GROUPsignal_group is invalid.
HSA_STATUS_ERROR_INVALID_ARGUMENTconditions is NULL, compare_values is NULL, signal is NULL, or value is NULL.

◆ hsa_signal_group_wait_any_scacquire()

hsa_status_t HSA_API hsa_signal_group_wait_any_scacquire ( hsa_signal_group_t  signal_group,
const hsa_signal_condition_t conditions,
const hsa_signal_value_t compare_values,
hsa_wait_state_t  wait_state_hint,
hsa_signal_t signal,
hsa_signal_value_t value 
)

Wait until the value of at least one of the signals in a signal group satisfies its associated condition.

The function is guaranteed to return if the value of at least one of the signals in the group satisfies its associated condition at some point in time during the wait, but the signal value returned to the application may no longer satisfy the condition. The application must ensure that signals in the group are used in such way that wait wakeup conditions are not invalidated before dependent threads have woken up.

When this operation internally loads the value of the passed signal, it uses the memory order indicated in the function name.

Parameters
[in]signal_groupSignal group.
[in]conditionsList of conditions. Each condition, and the value at the same index in compare_values, is used to compare the value of the signal at that index in signal_group (the signal passed by the application to hsa_signal_group_create at that particular index). The size of conditions must not be smaller than the number of signals in signal_group; any extra elements are ignored. Must not be NULL.
[in]compare_valuesList of comparison values. The size of compare_values must not be smaller than the number of signals in signal_group; any extra elements are ignored. Must not be NULL.
[in]wait_state_hintHint used by the application to indicate the preferred waiting state. The actual waiting state is decided by the HSA runtime and may not match the provided hint. A value of HSA_WAIT_STATE_ACTIVE may improve the latency of response to a signal update by avoiding rescheduling overhead.
[out]signalSignal in the group that satisfied the associated condition. If several signals satisfied their condition, the function can return any of those signals. Must not be NULL.
[out]valueObserved value for signal, which might no longer satisfy the specified condition. Must not be NULL.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_INVALID_SIGNAL_GROUPsignal_group is invalid.
HSA_STATUS_ERROR_INVALID_ARGUMENTconditions is NULL, compare_values is NULL, signal is NULL, or value is NULL.

◆ hsa_signal_load_acquire()

hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_load_acquire ( hsa_signal_t  signal)

Atomically read the current value of a signal.

Deprecated:
Renamed as hsa_signal_load_scacquire.
Parameters
[in]signalSignal.
Returns
Value of the signal.

◆ hsa_signal_load_relaxed()

hsa_signal_value_t HSA_API hsa_signal_load_relaxed ( hsa_signal_t  signal)

Atomically read the current value of a signal.

Parameters
[in]signalSignal.
Returns
Value of the signal.

◆ hsa_signal_load_scacquire()

hsa_signal_value_t HSA_API hsa_signal_load_scacquire ( hsa_signal_t  signal)

Atomically read the current value of a signal.

Parameters
[in]signalSignal.
Returns
Value of the signal.

◆ hsa_signal_or_acq_rel()

void HSA_API HSA_DEPRECATED hsa_signal_or_acq_rel ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise OR operation between the value of a signal and a given value.

Deprecated:
Renamed as hsa_signal_or_scacq_screl.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to OR with the value of the signal.

◆ hsa_signal_or_acquire()

void HSA_API HSA_DEPRECATED hsa_signal_or_acquire ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise OR operation between the value of a signal and a given value.

Deprecated:
Renamed as hsa_signal_or_scacquire.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to OR with the value of the signal.

◆ hsa_signal_or_relaxed()

void HSA_API hsa_signal_or_relaxed ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise OR operation between the value of a signal and a given value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to OR with the value of the signal.

◆ hsa_signal_or_release()

void HSA_API HSA_DEPRECATED hsa_signal_or_release ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise OR operation between the value of a signal and a given value.

Deprecated:
Renamed as hsa_signal_or_screlease.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to OR with the value of the signal.

◆ hsa_signal_or_scacq_screl()

void HSA_API hsa_signal_or_scacq_screl ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise OR operation between the value of a signal and a given value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to OR with the value of the signal.

◆ hsa_signal_or_scacquire()

void HSA_API hsa_signal_or_scacquire ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise OR operation between the value of a signal and a given value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to OR with the value of the signal.

◆ hsa_signal_or_screlease()

void HSA_API hsa_signal_or_screlease ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise OR operation between the value of a signal and a given value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to OR with the value of the signal.

◆ hsa_signal_silent_store_relaxed()

void HSA_API hsa_signal_silent_store_relaxed ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically set the value of a signal without necessarily notifying the the agents waiting on it.

The agents waiting on signal may not wake up even when the new value satisfies their wait condition. If the application wants to update the signal and there is no need to notify any agent, invoking this function can be more efficient than calling the non-silent counterpart.

Parameters
[in]signalSignal.
[in]valueNew signal value.

◆ hsa_signal_silent_store_screlease()

void HSA_API hsa_signal_silent_store_screlease ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically set the value of a signal without necessarily notifying the the agents waiting on it.

The agents waiting on signal may not wake up even when the new value satisfies their wait condition. If the application wants to update the signal and there is no need to notify any agent, invoking this function can be more efficient than calling the non-silent counterpart.

Parameters
[in]signalSignal.
[in]valueNew signal value.

◆ hsa_signal_store_relaxed()

void HSA_API hsa_signal_store_relaxed ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically set the value of a signal.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal.
[in]valueNew signal value.

◆ hsa_signal_store_release()

void HSA_API HSA_DEPRECATED hsa_signal_store_release ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically set the value of a signal.

Deprecated:
Renamed as hsa_signal_store_screlease.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal.
[in]valueNew signal value.

◆ hsa_signal_store_screlease()

void HSA_API hsa_signal_store_screlease ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically set the value of a signal.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal.
[in]valueNew signal value.

◆ hsa_signal_subtract_acq_rel()

void HSA_API HSA_DEPRECATED hsa_signal_subtract_acq_rel ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically decrement the value of a signal by a given amount.

Deprecated:
Renamed as hsa_signal_subtract_scacq_screl.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to subtract from the value of the signal.

◆ hsa_signal_subtract_acquire()

void HSA_API HSA_DEPRECATED hsa_signal_subtract_acquire ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically decrement the value of a signal by a given amount.

Deprecated:
Renamed as hsa_signal_subtract_scacquire.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to subtract from the value of the signal.

◆ hsa_signal_subtract_relaxed()

void HSA_API hsa_signal_subtract_relaxed ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically decrement the value of a signal by a given amount.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to subtract from the value of the signal.

◆ hsa_signal_subtract_release()

void HSA_API HSA_DEPRECATED hsa_signal_subtract_release ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically decrement the value of a signal by a given amount.

Deprecated:
Renamed as hsa_signal_subtract_screlease.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to subtract from the value of the signal.

◆ hsa_signal_subtract_scacq_screl()

void HSA_API hsa_signal_subtract_scacq_screl ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically decrement the value of a signal by a given amount.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to subtract from the value of the signal.

◆ hsa_signal_subtract_scacquire()

void HSA_API hsa_signal_subtract_scacquire ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically decrement the value of a signal by a given amount.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to subtract from the value of the signal.

◆ hsa_signal_subtract_screlease()

void HSA_API hsa_signal_subtract_screlease ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically decrement the value of a signal by a given amount.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to subtract from the value of the signal.

◆ hsa_signal_wait_acquire()

hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_wait_acquire ( hsa_signal_t  signal,
hsa_signal_condition_t  condition,
hsa_signal_value_t  compare_value,
uint64_t  timeout_hint,
hsa_wait_state_t  wait_state_hint 
)

Wait until a signal value satisfies a specified condition, or a certain amount of time has elapsed.

Deprecated:
Renamed as hsa_signal_wait_scacquire.

A wait operation can spuriously resume at any time sooner than the timeout (for example, due to system or other external factors) even when the condition has not been met.

The function is guaranteed to return if the signal value satisfies the condition at some point in time during the wait, but the value returned to the application might not satisfy the condition. The application must ensure that signals are used in such way that wait wakeup conditions are not invalidated before dependent threads have woken up.

When the wait operation internally loads the value of the passed signal, it uses the memory order indicated in the function name.

Parameters
[in]signalSignal.
[in]conditionCondition used to compare the signal value with compare_value.
[in]compare_valueValue to compare with.
[in]timeout_hintMaximum duration of the wait. Specified in the same unit as the system timestamp. The operation might block for a shorter or longer time even if the condition is not met. A value of UINT64_MAX indicates no maximum.
[in]wait_state_hintHint used by the application to indicate the preferred waiting state. The actual waiting state is ultimately decided by HSA runtime and may not match the provided hint. A value of HSA_WAIT_STATE_ACTIVE may improve the latency of response to a signal update by avoiding rescheduling overhead.
Returns
Observed value of the signal, which might not satisfy the specified condition.

◆ hsa_signal_wait_relaxed()

hsa_signal_value_t HSA_API hsa_signal_wait_relaxed ( hsa_signal_t  signal,
hsa_signal_condition_t  condition,
hsa_signal_value_t  compare_value,
uint64_t  timeout_hint,
hsa_wait_state_t  wait_state_hint 
)

Wait until a signal value satisfies a specified condition, or a certain amount of time has elapsed.

A wait operation can spuriously resume at any time sooner than the timeout (for example, due to system or other external factors) even when the condition has not been met.

The function is guaranteed to return if the signal value satisfies the condition at some point in time during the wait, but the value returned to the application might not satisfy the condition. The application must ensure that signals are used in such way that wait wakeup conditions are not invalidated before dependent threads have woken up.

When the wait operation internally loads the value of the passed signal, it uses the memory order indicated in the function name.

Parameters
[in]signalSignal.
[in]conditionCondition used to compare the signal value with compare_value.
[in]compare_valueValue to compare with.
[in]timeout_hintMaximum duration of the wait. Specified in the same unit as the system timestamp. The operation might block for a shorter or longer time even if the condition is not met. A value of UINT64_MAX indicates no maximum.
[in]wait_state_hintHint used by the application to indicate the preferred waiting state. The actual waiting state is ultimately decided by HSA runtime and may not match the provided hint. A value of HSA_WAIT_STATE_ACTIVE may improve the latency of response to a signal update by avoiding rescheduling overhead.
Returns
Observed value of the signal, which might not satisfy the specified condition.

◆ hsa_signal_wait_scacquire()

hsa_signal_value_t HSA_API hsa_signal_wait_scacquire ( hsa_signal_t  signal,
hsa_signal_condition_t  condition,
hsa_signal_value_t  compare_value,
uint64_t  timeout_hint,
hsa_wait_state_t  wait_state_hint 
)

Wait until a signal value satisfies a specified condition, or a certain amount of time has elapsed.

A wait operation can spuriously resume at any time sooner than the timeout (for example, due to system or other external factors) even when the condition has not been met.

The function is guaranteed to return if the signal value satisfies the condition at some point in time during the wait, but the value returned to the application might not satisfy the condition. The application must ensure that signals are used in such way that wait wakeup conditions are not invalidated before dependent threads have woken up.

When the wait operation internally loads the value of the passed signal, it uses the memory order indicated in the function name.

Parameters
[in]signalSignal.
[in]conditionCondition used to compare the signal value with compare_value.
[in]compare_valueValue to compare with.
[in]timeout_hintMaximum duration of the wait. Specified in the same unit as the system timestamp. The operation might block for a shorter or longer time even if the condition is not met. A value of UINT64_MAX indicates no maximum.
[in]wait_state_hintHint used by the application to indicate the preferred waiting state. The actual waiting state is ultimately decided by HSA runtime and may not match the provided hint. A value of HSA_WAIT_STATE_ACTIVE may improve the latency of response to a signal update by avoiding rescheduling overhead.
Returns
Observed value of the signal, which might not satisfy the specified condition.

◆ hsa_signal_xor_acq_rel()

void HSA_API HSA_DEPRECATED hsa_signal_xor_acq_rel ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise XOR operation between the value of a signal and a given value.

Deprecated:
Renamed as hsa_signal_xor_scacq_screl.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to XOR with the value of the signal.

◆ hsa_signal_xor_acquire()

void HSA_API HSA_DEPRECATED hsa_signal_xor_acquire ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise XOR operation between the value of a signal and a given value.

Deprecated:
Renamed as hsa_signal_xor_scacquire.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to XOR with the value of the signal.

◆ hsa_signal_xor_relaxed()

void HSA_API hsa_signal_xor_relaxed ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise XOR operation between the value of a signal and a given value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to XOR with the value of the signal.

◆ hsa_signal_xor_release()

void HSA_API HSA_DEPRECATED hsa_signal_xor_release ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise XOR operation between the value of a signal and a given value.

Deprecated:
Renamed as hsa_signal_xor_screlease.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to XOR with the value of the signal.

◆ hsa_signal_xor_scacq_screl()

void HSA_API hsa_signal_xor_scacq_screl ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise XOR operation between the value of a signal and a given value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to XOR with the value of the signal.

◆ hsa_signal_xor_scacquire()

void HSA_API hsa_signal_xor_scacquire ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise XOR operation between the value of a signal and a given value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to XOR with the value of the signal.

◆ hsa_signal_xor_screlease()

void HSA_API hsa_signal_xor_screlease ( hsa_signal_t  signal,
hsa_signal_value_t  value 
)

Atomically perform a bitwise XOR operation between the value of a signal and a given value.

If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.

Parameters
[in]signalSignal. If signal is a queue doorbell signal, the behavior is undefined.
[in]valueValue to XOR with the value of the signal.

Generated on Wed Sep 30 2020 14:02:20 for gem5 by doxygen 1.8.17