pthreads works, sorta

Christopher Faylor cgf@redhat.com
Tue Jun 26 23:30:00 GMT 2001


On Wed, Jun 27, 2001 at 02:51:13PM +0800, Dmitry Timoshkov wrote:
>"Robert Collins" <robert.collins@itdomain.com.au> wrote:
>
>[skipped]
>
>> What does all this mean? We need to catch invalid memroy access, and
>> ValidQuery was supplied by Chris as a tool to do that.
>
>In a multithreaded environment VirtualQuery, IsBad* and similar approaches
>are wrong. It can't be guaranteed that after a successful test that memory
>will be still accessable.

They are not necessarily wrong if they are controlled by appropriate mutexes.
The file handling code should be protected this way.   I don't know about
the thread code, though.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list