summaryrefslogtreecommitdiffstats
path: root/osdep/semaphore_osx.c
Commit message (Collapse)AuthorAgeFilesLines
* osdep/mac: make mac naming of files, folders and function consistentder richter2024-02-281-117/+0
| | | | | rename all macOS namings (osx, macosx, macOS, macos, apple) to mac, to make naming consistent.
* ALL: use new mp_thread abstractionKacper Michajłow2023-11-051-4/+4
|
* timer: remove MP_START_TIMENRK2023-10-271-3/+3
| | | | | instead require mp_raw_time_ns() to not return 0, which all current implementation already should follow.
* semaphore_osx: change mp_sem_timedwait to mp_timeKacper Michajłow2023-10-261-21/+15
|
* Fix use of ISC licensewm42017-04-151-1/+3
| | | | | | | | | | The license text refers a "above copyright notice", so I guess it'd be good to actually provide such a notice. Add the license to some files that were missing it (since in theory, our Copyright file says that such files are LGPL by default). Remove the questionable remarks about the license in the client API.
* osdep/semaphore_osx.c: Include osdep/semaphore.h before #ifdefDiogo Franco (Kovensky)2014-09-101-3/+2
| | | | | osdep/semaphore.h is the file that defines the very #define that is tested in the #ifdef that wraps its inclusion, so it was never compiled.
* osdep: fix windows buildwm42014-09-101-1/+2
| | | | Oops.
* osdep: add POSIX semaphore emulation for OSXwm42014-09-101-0/+121
OSX is POSIX conformant, but it's a sad joke: it provides the <semaphore.h> prototype as the standard demands, but they're empty wrappers, and all functions just return ENOSYS. Emulate them similar to how osdep/io.h emulate filesystem functions on Windows. By including the header, working sem_* functions become available. To make it async-signal safe, use a pipe for wakeup (write() is AS-safe, but mutexes can't be). Actually I'm not sure anymore if we really need AS-safety, but for now the emulation can do it. On Linux, the system provides a far more efficient and robust implementation. We definitely want to avoid using the emulation if possible, so this code is active on OSX only. For convenience we always build the source file though, even if the implementation is disabled and no actual code is generated. (Linux provides working semaphores, but is formally not POSIX conformant. On OSX it's the opposite. Is POSIX a complete joke?)