Instance Propertynmggithub.kass 3.2.4MachCore
policy
The synchronization policy of the semaphore.
let policy: Mach.SemaphorePolicy
The synchronization policy of the semaphore.
let policy: Mach.SemaphorePolicy
import MachCore
The core module for interacting with the Mach kernel.
class Semaphore
A semaphore.
struct Mach
The Mach kernel.
struct SemaphorePolicy
A synchronization policy for a semaphore.
let semaphoreOwningTask: Mach.Task
The task that owns the semaphore.
init(inTask task: Mach.Task, policy: Mach.SemaphorePolicy, value: Int32) throws
Creates a new semaphore in the given task.
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.
func signal(_ thread: Mach.Thread) throws
Signals a specific thread waiting on the semaphore.
func signal(all: Bool = false) throws
Signals the semaphore.
func wait(timeout: mach_timespec_t? = nil) throws
Waits for the semaphore.