[PATCH v2] librt: fix mq_timed{send,receive} return instructions

Baruch Siach baruch at tkos.co.il
Thu Nov 7 09:18:48 UTC 2013


Hi Bernhard,

On Thu, Nov 07, 2013 at 10:14:59AM +0100, Bernhard Reutner-Fischer wrote:
> On 7 November 2013 08:03, Baruch Siach <baruch at tkos.co.il> wrote:
> > Not all architectures use 'ret' as function return instruction. For example,
> > xtensa usually uses 'retw'. Use the ret_ERRVAL arch dependant macro instead.
> >
> > Signed-off-by: Baruch Siach <baruch at tkos.co.il>
> > ---
> > v2: Add ret_ERRVAL to architectures missing it as noted by Bernhard
> >         Reutner-Fischer.
> > ---
> >  libc/sysdeps/linux/bfin/sysdep.h  | 2 ++
> >  libc/sysdeps/linux/cris/sysdep.h  | 2 ++
> >  libc/sysdeps/linux/metag/sysdep.h | 2 ++
> >  libc/sysdeps/linux/sparc/sysdep.h | 2 ++
> >  librt/mq_timedreceive.S           | 2 +-
> >  librt/mq_timedsend.S              | 2 +-
> >  6 files changed, 10 insertions(+), 2 deletions(-)
> 
> I was more thinking about putting the default of ret into
> common/sysdep.h, make sure to include that in all arch specific
> sysdep.h and just re-define it on arches that diverge from the
> default?

Sounds much better. I just had the feeling from looking around at the arch 
specific code that duplicating identical definitions is the way to go. I'll 
update and resubmit.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -


More information about the uClibc mailing list