Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a pthread issue in 32-bit ARM debug builds. #508

Merged
merged 1 commit into from
Sep 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# master
*Please add new entries at the top.*

1. Workaround an unexpected EGAGIN error being returned by pthread in 32-bit ARM debug builds. (#508)

1. The `SignalProducer` internals have undergone a significant refactoring, which bootstraps the effort to reduce the overhead of constant producers and producer compositions. (#487, kudos to @andersio)

# 2.0.1
Expand Down
4 changes: 3 additions & 1 deletion Sources/Atomic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ internal class Lock {
attr.deallocate(capacity: 1)
}

#if DEBUG
// Darwin pthread for 32-bit ARM somehow returns `EAGAIN` when
// using `trylock` on a `PTHREAD_MUTEX_ERRORCHECK` mutex.
#if DEBUG && !arch(arm)
pthread_mutexattr_settype(attr, Int32(recursive ? PTHREAD_MUTEX_RECURSIVE : PTHREAD_MUTEX_ERRORCHECK))
#else
pthread_mutexattr_settype(attr, Int32(recursive ? PTHREAD_MUTEX_RECURSIVE : PTHREAD_MUTEX_NORMAL))
Expand Down