[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f-cpu] another DATE report

Christophe wrote:
> > Indeed, to avoid this problem when task switching, the usual workaround is to
> > disable interrupts before acquiring and after releasing the spinlock. But
> such
> > a thing is acceptable if time is very short between locking and unlocking,
> that
> > is, not using a blocking function in-between.
> ... is to disable interrupts JUST before acquiring and to ENABLE interrupts
> JUST after releasing the spinlock.

I have to check a book on real time programing, but this style of task
may not work on multiprocessors. I think the critical section algorithms
for multi-tasking favor normal instructions over atomic ones.  Looking
at software
all you are doing is emulating edge triggered flip/flops in software and
asynchronous logic from them. The task switching and real time clock
sync up the tasks. 
Synchronous logic is good for hardware, why not software? 
Ben Franchuk - Dawn * 12/24 bit cpu *
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/