tilus.Script.release_semaphore

tilus.Script.release_semaphore

Script.release_semaphore(semaphore, value)[source]

Release semaphore with a specified value.

This instruction releases the given semaphore with a specified value. It will set the semaphore to the specified value and make it visible to other thread blocks. The semaphore is a global int32 variable and semaphore should be an expression that evaluates to the address of the semaphore variable.

Parameters:
  • semaphore (Expr) – The expression that evaluates to the address of the semaphore variable.

  • value (Expr | int) – The value to release the semaphore with. This can be an integer or an expression that evaluates to an 32-bit signed integer.

Return type:

None