TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mike Bilow
from: Phil Crown
date: 1996-01-29 21:10:50
subject: thread safe

-=> Quoting Mike Bilow to Phil Crown <=- 
 
 MB> No, no... register variables are as thread-safe as stack variables.

 MB> When OS/2 switches threads, it takes responsibility for preserving the
 MB> stack and registers across the switch.  Each thread task owns its
 MB> private set of state information, including stack and register values,
 MB> so thread switching is transparent to all threads.

Got it... :-)

 MB> I have no idea what you mean about the supposed Borland bug, by the
 MB> way.  I can't imagine how any compiler could function without being
 MB> allowed to use the registers.

I found a copy of the saved message... it is that Borland *always* registers
local variables in certain situations, I am not worried about this (yet)...

Ä Area: Fidonet:  Os2prog                      Os2prog ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  Msg#: 1000            Rec'd                        Date: 10 Jul 95  16:59:26
  From: Paul Rider                                   Read: Yes    Replied: No 
    To: Phil Crown                                   Mark:                     
  Subj: Borland Bugs.
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Hello Phil,

 PC> Would you post a list of bugs you found in BCOS2?  I'd like to know if I'm
 PC> fighting a compiler bug or bug(s) in my own code. :-)
 PC> Phil
Well the most annoying, and the hardest to find was the way they stored data in
memory. The compiler was not calculating the address's correctly for some of
the variables. To correct this I compiled with 4byte alignment.

Another big bug (man this one ticks me off big time, spent days...) was the
non-functinality of the volatile keyword under certian circumstances. I found
that it worked find enough when testing it all within the same file, but for
what I was using it for it would allways 'optimize'(now there's a play on words
for the bcos2 compiler) the variable by placing it in a register.
My situation was: I declared a variable volatile within a class. When I
included the class def'n it had absolutley NO effect on how the variable(s)
were treated.

Other little bugs that I can't recall right now (on pain killers just had two
back teeth pulled) Those were the biggest problems for me anyways..
                                Paul Rider.

Phil
Fido:  1:124/8014.1 | Internet:  phil.crown{at}bluecafe.com


--- Blue Wave/Max v2.22c Beta
* Origin: * MacSavvy OS/2 BBS * Dallas, Texas * 214-250-4479 * (1:124/1208)
SEEN-BY: 50/99 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 124/1208 1 396/1 270/101 712/515 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™.