comp.lang.ada
 help / color / mirror / Atom feed
From: beckwb@ois.com (R. William Beckwith)
Subject: Re: Tasking and C-interfaces - variable storage
Date: Sat, 5 Nov 1994 03:17:09 GMT
Date: 1994-11-05T03:17:09+00:00	[thread overview]
Message-ID: <CyryGM.G9v@ois.com> (raw)
In-Reply-To: mmcnett.783892032@sparc53.cs.uiuc.edu

mcnett michael david (mmcnett@sparc53.cs.uiuc.edu) wrote:

: I am having a problem concerning tasking. I am using GNAT-1.83 for Sparc 4.1.

: It appears that when I instantiate a task, the variables that are directly 
: defined in the task body are correctly being maintained (ie. a seperate copy
: for each task instantiated).  However, I am making calls to several C routines
: within each task, but it appears that each task is not maintaining its own
: copies of the variables in those C routines.

Without seeing the C code I can only venture a guess that the C code is
using global (static) variables.  The stack based C variables (arguments
and locals automatic) should have separate copies for each task.  You
might want to make sure the size of each task's stack is large enough if
their are no global variables in the C code.

... Bill

-- 
e-mail: Bill.Beckwith@ois.com       |    Team Ada
Objective Interface Systems, Inc.   | dist, full O-O
1895 Preston White Drive, Suite 250 | multithreading
Reston, VA  22091-5448  U.S.A.      |    built in



      reply	other threads:[~1994-11-05  3:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-11-03 19:47 Tasking and C-interfaces - variable storage mcnett michael david
1994-11-05  3:17 ` R. William Beckwith [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox