Re: [PATCH v3] Cygwin: Implement sched_[gs]etaffinity()

2019-06-24 Thread Corinna Vinschen
Hi Mark, On Jun 23 14:51, Mark Geisert wrote: > This patch set implements the Linux syscalls sched_getaffinity, > sched_setaffinity, pthread_getaffinity_np, and pthread_setaffinity_np. > Linux has a straightforward view of the cpu sets used in affinity masks. > They are simply long (1024-bit) bit

[PATCH] Cygwin: timerfd: avoid a deadlock

2019-06-24 Thread Ken Brown
If a timer expires while the timerfd thread is in its inner loop, check for the thread cancellation event before trying to enter a_critical_section. It's possible that timerfd_tracker::dtor has entered its critical section and is trying to cancel the thread. See http://www.cygwin.org/ml/cygwin/20

Re: [PATCH] Cygwin: timerfd: avoid a deadlock

2019-06-24 Thread Ken Brown
On 6/24/2019 4:19 PM, Ken Brown wrote: > If a timer expires while the timerfd thread is in its inner loop, > check for the thread cancellation event before trying to enter > a_critical_section. It's possible that timerfd_tracker::dtor has > entered its critical section and is trying to cancel the

[PATCH] Cygwin: Fix return value of sched_getaffinity

2019-06-24 Thread Mark Geisert
Return what the documentation says, instead of a misreading of it. --- winsup/cygwin/sched.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc index e7b44d319..8f24bf80d 100644 --- a/winsup/cygwin/sched.cc +++ b/winsup/cygwin/sched