From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philippe Gerum In-Reply-To: <465ADB44.2070705@domain.hid> References: <0B45E93C5FF65740AEAE690BF3848B7A4AB0F3@domain.hid> <465ADB44.2070705@domain.hid> Content-Type: text/plain Date: Mon, 28 May 2007 15:51:27 +0200 Message-Id: <1180360288.4727.50.camel@domain.hid> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: Philippe Gerum Subject: Re: [Xenomai-help] =?iso-8859-1?q?Xenomai_with_=B5Clibc?= Reply-To: rpm@xenomai.org List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: xenomai@xenomai.org On Mon, 2007-05-28 at 15:38 +0200, Gilles Chanteperdrix wrote: > Fillod Stephane wrote: > > You may also need this patch: > > > > --- skins/native/task.c 20 Mar 2007 08:16:41 -0000 1.1.1.1 > > +++ skins/native/task.c 28 Mar 2007 13:53:03 -0000 1.2 > > @@ -135,7 +135,12 @@ > > pthread_attr_setstacksize(&thattr, stksize); > > if (!(mode & T_JOINABLE)) > > pthread_attr_setdetachstate(&thattr, PTHREAD_CREATE_DETACHED); > > - if (prio > 0) { > > + /* There's a limitation in libpthread > > + * that returns EPERM upon SCHED_FIFO > > + * for non priviledged users. > > + * So workaround this for now. FIXME (in uClibc/pthread). > > + */ > > + if (prio > 0 && geteuid() == 0) { > > pthread_attr_setschedpolicy(&thattr, SCHED_FIFO); > > param.sched_priority = sched_get_priority_max(SCHED_FIFO); > > } > > I do not think it is a good idea, I prefer rt_task_create to fail loudly > because it needs root priviledge, rather than silently creating a non > real-time thread. > Agreed. -- Philippe.