i tried a solution ..
int A
{
spin_lock a
x=0
func A()
x=1;
spin_unlock a
}
int B
{
done = false;
while(done == false)
{
spin_lock a;
if(x==1){
func B()
spin_unlock a;
done = true;
}
else if(x==0) {
spin_unlock a;
}
}//while
}
On Tue, Feb 9, 2010 at 2:03 AM, Andrea Gasparini <[email protected]> wrote:
> In data lunedì 08 febbraio 2010 17:50:29, Mulyadi Santosa ha scritto:
> > First idea that crosses my mind is:
> >
> > create an atomic (maybe 64 bit one?) counter. Increase it every time
> > funcA() is executed. then, create same type of counter, let;s name it
> > old_counter...
> <snip>
>
> LOL, Exactly what I tried. In fact it works, I just hoped that there was
> any
> common "design pattern", but seems not.
>
> Thanks a lot, bye!
> --
> -gaspa-
> -----------------------------------------------
> --------- http://launchpad.net/~gaspa <http://launchpad.net/%7Egaspa>---------
> ------- HomePage: gaspa.yattaweb.it --------
> -Il lunedi'dell'arrampicatore: www.lunedi.org -
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to [email protected]
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>
--
Thanks & Regards
Nidhi Mittal Hada