www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/07/12/20:08:47

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.6 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Date: Mon, 12 Jul 2010 19:08:35 -0500
Message-ID: <AANLkTilUOvokJegrpLgmg-T7Sa7pBzbxbnAxuwFoYvLa@mail.gmail.com>
Subject: Re: pthread_mutex_lock doesn't interrupt
From: James Cotton <peabody124 AT gmail DOT com>
To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Sorry, I don't have access to the actual POSIX standard, but my
interpretation is based on man pages:

https://computing.llnl.gov/tutorials/pthreads/man/pthread_mutex_lock.txt

And certainly nowhere have I see "pthread_mutex_lock blocks signals".
The signal we are using is SIGUSR1.  I don't see why the signal would
be deferred since there are no signals being blocked.  Possibly the
first signal gets caught and another one comes while in the signal
handler (where usual that signal should then get blocked) and is
disrupting the processing.

James

>On 12 July 2010 17:56, James Cotton wrote:
>> Hello, I've been trying to get the FreeRTOS Posix simulator to run on
>> Cygwin and have run into a few bugs in the signal handling/pthread
>> libraries and have isolated test cases
>>
>> I believe when pthread_mutex_lock receives an interrupt it should run
>> it then resume trying to get a lock
>
>Have you got chapter and verse from the POSIX standard on that? By
>'interrupt' do you mean SIGINT or any signal? Is it possible that the
>signal is just being deferred and then subsumed by later signals?
>
>Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019