From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 4 Mar 2015 22:48:09 +0100 From: Gilles Chanteperdrix Message-ID: <20150304214809.GH30672@hermes.click-hack.org> References: <20150304174252.GF30672@hermes.click-hack.org> <666349AB-944C-4C85-83DE-C37BB9231AB1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <666349AB-944C-4C85-83DE-C37BB9231AB1@gmail.com> Subject: Re: [Xenomai] Debugger and secondary mode question List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mathew Benson Cc: "xenomai@xenomai.org" On Wed, Mar 04, 2015 at 03:45:09PM -0600, Mathew Benson wrote: > I'll test it again shortly. > > What happens when a thread depletes a semaphore or takes a mutex, then transitions to secondary mode? Does the semaphore or mutex automatically get given back or does the thread keep it for when it transitions back to primary mode? It keeps it, but this is very bad, and you should normally get a warning in your kernel console. You can get a SIGDEBUG too, if you enable the notification for the thread. Of course, when debugging, timing issues are not so important, so this is not an issue. -- Gilles.