TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mark Kimes
from: Russell Coker
date: 1994-09-10 21:32:24
subject: Re: _Beginthread() Data

KB>So, am I correct in assuming that in this situation I must
 KB>absolutely guarantee that this memory will be used exclusively by
 KB>that thread for as long as the thread might need it?

MK>Yep, or at least long enough to be copied, which can be accomplished by
MK>passing a pointer to a structure containing a pointer to a semaphore
MK>member which the thread posts after copying, for example.  The semaphore
MK>could also be global or named(/shared), depending on the circumstances.

   Only if the design of the application requires that the thread read/copy
the data before it's modified.  The application I'm working on at the
moment requires that multiple threads share a memory region for setting
control flags.  It works perfectly (well no bugs are caused by this anyway
;-).


   cya
___
 X MR/2 2.0 NR X Doctor Who for primeminister

--- Maximus/2 2.01wb

* Origin: Multi - 61-3-739-7145 (3:633/363)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/301 341 348 365 386 998 633/104 252
SEEN-BY: 633/260 357 363 371 373 379 634/384 635/210 502 503 636/100 638/100
SEEN-BY: 640/820 690/660 711/409 410 413 430 807 808 809 934 942 712/353 623
SEEN-BY: 713/888 800/1
@PATH: 633/363 260 371 635/503 632/348 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.