* Problem with CXX 5.7 and OpenServer Threads
@ 1998-05-14 4:00 c.eltawil
0 siblings, 0 replies; only message in thread
From: c.eltawil @ 1998-05-14 4:00 UTC (permalink / raw)
A server spawns several threads, most of the threads calls a certain function.
The function say my_func_1 contains local variables of different types.
SYBOOKS and threads in general says that each thread has its own stack.
For some reason the variables of type CS_FLOAT from my_func_1 seem to be
shared; not the CS_INTs.
Eg:
CS_RETCODE my_func_1(CS_VOID)
{
CS_INT i_my_var_1 ;
CS_FLOAT f_my_var_2 ;
i_my_var_1 = 100 ;
f_my_var_2 = 12.3 ;
/* code that changes both variables */
}
Say thread 8 calls my_func_1() and f_my_var_2 is set to a certain value y.
A little later thread 9 calls my_func_1() and f_my_var_2 is set z,
Now thread 8 sees f_my_var_2 as z and not y.
This is a problem that only occurs on DEC Alpha
"OSF1 <hostname> V4.0 564 alpha"
compiling with cxx 5.7
using Sybase Server-Library/11.1.1/P/DEC AXP/OSF/1 4.0/1/OPT/Tue Jul 15
18:33:17 1997.
For C++ code.
Anybody ever seen this or used this combination of machine, compiler and
SYBASE library.
Cheers
Cherif
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-05-14 4:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-05-14 4:00 Problem with CXX 5.7 and OpenServer Threads c.eltawil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox