Instance Methodnmggithub.kass 3.2.4MachCore
signal(all:)
Signals the semaphore.
func signal(all: Bool = false) throws
Signals the semaphore.
func signal(all: Bool = false) throws
import MachCore
The core module for interacting with the Mach kernel.
class Semaphore
A semaphore.
struct Mach
The Mach kernel.
@frozen struct Bool
A value type whose instances are either true
or false
.
func signal(_ thread: Mach.Thread) throws
Signals a specific thread waiting on the semaphore.
func wait(timeout: mach_timespec_t? = nil) throws
Waits for the semaphore.
static func wait(forSemaphore waitSemaphore: Semaphore, thenSignalSemaphore signalSemaphore: Semaphore, timeout: mach_timespec_t? = nil) throws
Atomically waits for one semaphore and signals another.
override func destroy() throws
Destroys the semaphore.
init(inTask task: Mach.Task, policy: Mach.SemaphorePolicy, value: Int32) throws
Creates a new semaphore in the given task.
let policy: Mach.SemaphorePolicy
The synchronization policy of the semaphore.
let semaphoreOwningTask: Mach.Task
The task that owns the semaphore.