Differences From Artifact [e7b8301e49]:
- File src/platform/amiga/mutex.m — part of check-in [374e1a1bfa] at 2021-01-02 22:04:26 on branch trunk — Update copyright (user: js, size: 1390) [annotate] [blame] [check-ins using] [more...]
To Artifact [e655c5c2cf]:
- File
src/platform/amiga/mutex.m
— part of check-in
[dfd52d5220]
at
2021-04-17 16:24:13
on branch new-naming-convention
— of_mutex_t -> OFPlainMutex
Also rename of_rmutex_t -> OFPlainRecursiveMutex. (user: js, size: 1535) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
18 19 20 21 22 23 24 | #include <errno.h> #import "mutex.h" #include <proto/exec.h> int | | | | | | | | | | | | | | | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | #include <errno.h> #import "mutex.h" #include <proto/exec.h> int OFPlainMutexNew(OFPlainMutex *mutex) { InitSemaphore(mutex); return 0; } int OFPlainMutexLock(OFPlainMutex *mutex) { ObtainSemaphore(mutex); return 0; } int OFPlainMutexTryLock(OFPlainMutex *mutex) { if (!AttemptSemaphore(mutex)) return EBUSY; return 0; } int OFPlainMutexUnlock(OFPlainMutex *mutex) { ReleaseSemaphore(mutex); return 0; } int OFPlainMutexFree(OFPlainMutex *mutex) { return 0; } int OFPlainRecursiveMutexNew(OFPlainRecursiveMutex *rmutex) { return OFPlainMutexNew(rmutex); } int OFPlainRecursiveMutexLock(OFPlainRecursiveMutex *rmutex) { return OFPlainMutexLock(rmutex); } int OFPlainRecursiveMutexTryLock(OFPlainRecursiveMutex *rmutex) { return OFPlainMutexTryLock(rmutex); } int OFPlainRecursiveMutexUnlock(OFPlainRecursiveMutex *rmutex) { return OFPlainMutexUnlock(rmutex); } int OFPlainRecursiveMutexFree(OFPlainRecursiveMutex *rmutex) { return OFPlainMutexFree(rmutex); } |