Overview
| Artifact ID: | e45d2d7101da0c0f935625ce3459fc4f0185b5e2d5f9b95df6fe12dac5aa95b2 |
|---|---|
| Ticket: | 7f3321da83ae25134cac8569f14c707e8651ef37
os_unfair_lock instead of OSSpinLock on macOS >= 10.12 |
| User & Date: | anonymous on 2019-07-23 15:49:27 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OSSpinLock is deprecated on macOS 10.12, so this is an attempt to silent compiler sorry but I don't know exactly how to use diff diff /Users/nico/Desktop/tclMacOSXNotify.c /Users/nico/daylight/lib/framework/tcl-50a5729f85/macosx/tclMacOSXNotify.c 39,42d38 < #if MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 < #include <os/lock.h> < #define _USE_OS_UNFAIR_LOCK 1 < #endif 88,92d83 < #ifdef _USE_OS_UNFAIR_LOCK < #define SpinLockLock(p) os_unfair_lock_lock(p) < #define SpinLockUnlock(p) os_unfair_lock_unlock(p) < #define SpinLockTry(p) os_unfair_lock_trylock(p) < #else 96d86 < #endif /* _USE_OS_UNFAIR_LOCK */ 120,123d109 < #ifdef _USE_OS_UNFAIR_LOCK < static os_unfair_lock notifierInitLock = (OS_UNFAIR_LOCK_INIT); < static os_unfair_lock notifierLock = (OS_UNFAIR_LOCK_INIT); < #else 126d111 < #endif 132,137c117,122 < #define LOCK_NOTIFIER_INIT SpinLockLock(¬ifierInitLock) < #define UNLOCK_NOTIFIER_INIT SpinLockUnlock(¬ifierInitLock) < #define LOCK_NOTIFIER SpinLockLock(¬ifierLock) < #define UNLOCK_NOTIFIER SpinLockUnlock(¬ifierLock) < #define LOCK_NOTIFIER_TSD SpinLockLock(&tsdPtr->tsdLock) < #define UNLOCK_NOTIFIER_TSD SpinLockUnlock(&tsdPtr->tsdLock) --- > #define LOCK_NOTIFIER_INIT SpinLockLock(¬ifierInitLock) > #define UNLOCK_NOTIFIER_INIT SpinLockUnlock(¬ifierInitLock) > #define LOCK_NOTIFIER SpinLockLock(¬ifierLock) > #define UNLOCK_NOTIFIER SpinLockUnlock(¬ifierLock) > #define LOCK_NOTIFIER_TSD SpinLockLock(&tsdPtr->tsdLock) > #define UNLOCK_NOTIFIER_TSD SpinLockUnlock(&tsdPtr->tsdLock) 287,296c272,274 < #ifdef _USE_OS_UNFAIR_LOCK < os_unfair_lock tsdLock; /* Must hold this lock before acessing the < * following fields from more than one < * thread. */ < #else < OSSpinLock tsdLock; /* Must hold this lock before acessing the < * following fields from more than one < * thread. */ < #endif < --- > OSSpinLock tsdLock; /* Must hold this lock before acessing the > * following fields from more than one > * thread. */ 553,555d530 < #ifdef _USE_OS_UNFAIR_LOCK < tsdPtr->tsdLock = OS_UNFAIR_LOCK_INIT; < #else 557d531 < #endif
- is_private changed to: "0"
- login: "anonymous"
- priority changed to: "5 Medium"
- private_contact changed to: "10e302b1a1ae78d60a0878d87bdb4b5f874b815e"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "anonymous"
- subsystem changed to: "01. Notifier"
- title changed to:
os_unfair_lock instead of OSSpinLock on macOS >= 10.12
- type changed to: "Patch"