From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4DD562FF.3020909@domain.hid> Date: Thu, 19 May 2011 20:35:43 +0200 From: Gilles Chanteperdrix MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-help] priority coupling and Linux threads List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Weber Cc: xenomai@xenomai.org On 05/19/2011 08:30 PM, Jeff Weber wrote: > If XENO_OPT_PRIOCPL is enabled, can a non-Xenomai Linux thread, created > via __real_pthread_create() preempt a Xenomai primary-mode or Xenomai > secondary-mode thread? a non-Xenomai Linux thread can preempt a Xenomai thread running in secondary mode, independently from XENO_OPT_PRIOCPL. It can not preempt a Xenomai thread running in primary mode, again, independently from XENO_OPT_PRIOCTL. What XENO_OPT_PRIOCTL changes, is that a Xenomai thread running in secondary mode can preempt a Xenomai thread running in primary mode. > > For example, when the Linux kernel inherits the priority of a > primary-mode thread to run it in secondary mode, can the kernel then > discover some other Linux thread with better priority and preempt the > secondary mode thread? Yes, it can, but as soon as it decides to switch to this thread, the priority coupling ends, and the system switches to primary mode threads, if one is runnable. -- Gilles.