Hi,
Thanks for your inputs. I have single CPU and current version of it does not 
support atomic instructions :(.
I'll check on the suggestions y

Thanks & regards,
Amruta Bhat
 
 

-----Original Message-----
From: uclinux-dev-boun...@uclinux.org [mailto:uclinux-dev-boun...@uclinux.org] 
On Behalf Of Jamie Lokier
Sent: Wednesday, August 05, 2009 11:13 PM
To: uClinux development list
Subject: Re: [uClinux-dev] Shell exits while running a program.

Michael Schnell wrote:
> > I don’t think the uClibc that I have supports futexes as there is
> > a note in its TODO to add support for futexes.
> 
> If you use a noMMU architecture it might be quite easy to do the FUTEX,
> as you can disable and re-enable the global Interrupt in a userland
> application (at least with NIOS2-noMMU this is possible. But I suppose
> you need to recompile your glibC for this.

MMU or not isn't relevant.  Some noMMU architectures don't let you
disable interrupts from userspace, and some MMU architectures do.

What matters is:

   - Do you have atomic instructions.
   - Do you have one CPU or multiple CPUs.

Let's assume you have a single CPU and no special atomic instructions.

Then you can either:

   - Disable interrupts (like on NIOS-noMMU) for the fastpath
     operation, if that's possible.

   - Copy the trick used on ARM to implement atomic-compare-exchange
     in the vsyscall page, without disabling interrupts.

The vsyscall trick is a good one, and works with/without MMU, and
with/without permission to disable interrupts in userspace.  It's fast
too.  I recommend reading the code.  It's only a few instructions.

-- Jamie
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to