From: Don Melano <dmelano@tspi.elan.af.mil>
Subject: Re: Urgent Problem: Sybase Threads on OSF1 Alpha
Date: 1998/05/13 [thread overview]
Message-ID: <35599B32.794B@tspi.elan.af.mil> (raw)
In-Reply-To: 6ja0nl$eqt$1@nnrp1.dejanews.com
c.eltawil@architel.com wrote:
>
> Hi,
> We have an application that was written with Sybase threads.
> After porting it to a DEC Alpha machine, there seems to be a problem,
> here it is:
>
> 2 different threads are calling the same function
> some variables declared local as automatic in that function are corrupted
> (doesn't thread has a stack of its own)
>
> Anybody has ever experirnced this or has any insights.
>
> thanks in advance
>
> BTW: that problem does not appear on other platforms (HP, Sun, IBM).
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
According to Kernighan & Ritchie "The C Programming Language":
"automatic variables come and go with function invocation, they do not
retain their values from one call to the next, and must be explicity
set upon each entry. If they are not set, they will contain garbage."
Also note according to David Butenhof's book "Programming with POSIX
Threads" that all threads within a process share the same address space
and that any variable declared as "static" or "extern", or in the
"process heap", may be read and written by all threads within the
process.
Hope this helps.
--
Don Melano
Computer Sciences Corp.
Advanced Technology Divison
Edwards Air Force Base, Flight Test Center, CA.
next prev parent reply other threads:[~1998-05-13 4:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-12 4:00 Urgent Problem: Sybase Threads on OSF1 Alpha c.eltawil
1998-05-13 4:00 ` Don Melano [this message]
1998-05-15 4:00 ` Brian Ceccarelli
1998-05-19 4:00 ` Michael Zarlenga
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox