On Mon, 14 Mar 2005, noone_1983 wrote:
.......
> On a related note, with threads, are there any issues with memory
> access and IO that would be of concern? No two threads should attempt
> to read from the same I/O pin, but different I/O pin read and writes
> may occur from different threads. Would there be any issues I would
> be missing?
It depends, if you are only reading inputs then probably no issues, but if
you are mixing some pins of a port for output and some for input then
there are issues. You are going to have to do some form of
read/modify/write on the whole port byte to "write" pin values,
you will need to "lock" the code round the read/modify/write, to prevent
another thread being scheduled part way thru' and starting its own
read/modify/write that then gets "undone" when the first thread completes.
Jim
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|