Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mac] Fix failing Designer test (dotnet#6202)
Context: dotnet@69289d7 69289d7 introduced the use of POSIX semaphore API to protect assembly mmap code from race conditions. However, it turns out that macOS implementation of the semaphore is deprecated and always returns an error, which in turn makes the Xamarin.Android runtime to [abort][0] the application: [2021-08-18 23:45:32.5] Renderer (error) >> ../../../jni/embedded-assemblies.hh:89 (prepare_for_multiple_threads): Failed to initialize assembly mapping semaphore. Function not implemented [2021-08-18 23:45:32.5] Renderer >> [2021-08-18 23:45:32.5] Renderer >> ================================================================= [2021-08-18 23:45:32.5] Renderer >> Native Crash Reporting [2021-08-18 23:45:32.5] Renderer >> ================================================================= [2021-08-18 23:45:32.5] Renderer >> Got a abrt while executing native code. This usually indicates [2021-08-18 23:45:32.5] Renderer >> a fatal error in the mono runtime or one of the native libraries [2021-08-18 23:45:32.5] Renderer >> used by your application. [2021-08-18 23:45:32.5] Renderer >> ================================================================= While our MinGW Windows build supports and implements the semaphore API, this commit changes the runtime code to use a standard mutex (`std::mutex`) for both Windows and macOS instead of the semaphore API. Additionally, fix a handful of warnings when building for desktop platforms. [0]: https://github.com/xamarin/xamarin-android/pull/6188/files#r691713959
- Loading branch information