IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

shmem_signal_wait_until

shmem_signal_wait_until(sig_addr: UnsafePointer[UInt64], cmp: Int32, cmp_value: UInt64)

Wait for a variable on the local PE to change from a signaling operation.

shmem_signal_wait_until operation blocks until the value contained in the signal data object, sig_addr, at the calling PE satisfies the wait condition. In a program with single-threaded or multithreaded PEs, the sig_addr object at the calling PE is expected only to be updated as a signal. This routine can be used to implement point-to-point synchronization between PEs or between threads within the same PE. A call to this routine blocks until the value of sig_addr at the calling PE satisfies the wait condition specified by the comparison operator, cmp, and comparison value, cmp_value. Implementations must ensure that shmem_signal_wait_until do not return before the update of the memory indicated by sig_addr is fully complete.

Args:

  • โ€‹sig_addr (UnsafePointer[UInt64]): Local address of the remotely accessible source signal variable.
  • โ€‹cmp (Int32): The comparison operator that compares sig_addr with cmp_value.
  • โ€‹cmp_value (UInt64): The value against which the object pointed to by sig_addr will be compared.