Date: Tue, 9 Dec 2014 21:24:03 +0100 From: Gilles Chanteperdrix Message-ID: <20141209202403.GN30777@hermes.click-hack.org> References: <471986235a5c47e395ece6b3d18830bd@EX132MBOX1A.de2.local> <20141207124041.GS10014@hermes.click-hack.org> <76bf78d4e9644f9394558dc10207fb96@EX132MBOX1A.de2.local> <20141207135204.GT10014@hermes.click-hack.org> <08dc5da0a9d94655819f8094c4ac6c7a@EX132MBOX1A.de2.local> <20141209200820.GM30777@hermes.click-hack.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Xenomai] Sleeping function called from invalid context List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Stoidner, Christoph" Cc: "xenomai@xenomai.org" On Tue, Dec 09, 2014 at 08:18:53PM +0000, Stoidner, Christoph wrote: > > >> #ifndef DEFINE_SEMAPHORE > >> /* Legacy DECLARE_MUTEX vanished in 2.6.37 */ > >> #define DEFINE_BINARY_SEMAPHORE(sem) DECLARE_MUTEX(sem) > >> -#elif defined(CONFIG_PREEMPT_RT) > >> -#define DEFINE_BINARY_SEMAPHORE(sem) DEFINE_SEMAPHORE(sem, 1) > >> +#elif defined(CONFIG_PREEMPT_RT_FULL) > >> +#define DEFINE_BINARY_SEMAPHORE(sem) DEFINE_SEMAPHORE(sem) > >> #else > >> #define DEFINE_BINARY_SEMAPHORE(sem) DEFINE_SEMAPHORE(sem) > >> #endif > > > Why that change? I mean in 2.6.37, the define was CONFIG_PREEMPT_RT > > anwyay. > > If DEFINE_SEMAPHORE is not defined we are below 2.6.37. So for 2.6.37 and above CONFIG_PREEMPT_RT was checked. Well, are not we in the "elif" case of the #ifndef DEFINE_SEMAPHORE, so DEFINE_SEMAPHORE is defined, or am I missing something ? -- Gilles.