From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4357C4E2.9020500@domain.hid> Date: Thu, 20 Oct 2005 18:25:06 +0200 From: Philippe Gerum MIME-Version: 1.0 Subject: Re: [Xenomai-help] Replacement for rt_save_flags_and_cli References: <40292.128.93.15.41.1129793705.squirrel@domain.hid> <435766D6.6090605@domain.hid> <43576FA9.6010202@domain.hid> <4357C11B.3080103@domain.hid> In-Reply-To: <4357C11B.3080103@domain.hid> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Ignacio_Garc=EDa_P=E9rez?= Cc: xenomai@xenomai.org Ignacio Garc=EDa P=E9rez wrote: > Philippe Gerum wrote: >=20 >=20 >>Ignacio Garc=EDa P=E9rez wrote: >> >> >>>Hi, >>> >>>Porting app from RTAI. Just another newbie question. Is there a >>>substitute for rt_save_flags_and_cli / rt_restore_flags ?. >> >> >>See include/nucleus/asm-generic/hal.h: >> >>#define rthal_local_irq_save(x) =20 >>#define rthal_local_irq_restore(x) >=20 >=20 > Thanks. I just found the following functions in > include/nucleus/asm-generic/system.h >=20 > xnlock_get_irqsave > xnlock_put_irqrestore > xnlock_clear_irqoff > xnlock_clear_irqon >=20 > They're just #defines to the rthal_ functions. >=20 > Should I use rthal_* or xnlock_* ? xnlock is there for SMP support if needed. It's the equivalent of Linux's= =20 spinlocks, but usable in any context (high priority Xenomai domain or Lin= ux).=20 The defines to rthal_* routines are fallbacks for UP configurations. >=20 > By the way, so far I'm uttery in love with the clean, consistent API of > the native skin. >=20 Well, in its very early days, the RTAI/fusion effort was codenamed "dynam= ite",=20 notably wrt the API refactoring issue. Good to see that it shows. > Nacho. >=20 >=20 >=20 >=20 >=20 --=20 Philippe.