Instance Methodnmggithub.kass 3.2.4MachCore
destroy
Destroys the semaphore.
override func destroy() throws
Destroys the semaphore.
override func destroy() throws
import MachCore
The core module for interacting with the Mach kernel.
class Semaphore
A semaphore.
struct Mach
The Mach kernel.
func destroy() throws
Destroys the port.
func signal(all: Bool = false) throws
Signals the semaphore.
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.
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.