ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: question about threads

To:
Subject: Re: [ts-7000] Re: question about threads
From: Jim Jackson <>
Date: Mon, 14 Mar 2005 09:02:15 +0000 (GMT)

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/
 



<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU