* Re: JGNAT and Tasking problem
[not found] <3A925758.3D120457@earthlink.net>
@ 2001-02-23 16:05 ` Marc A. Criley
0 siblings, 0 replies; only message in thread
From: Marc A. Criley @ 2001-02-23 16:05 UTC (permalink / raw)
"Marc A. Criley" wrote:
>
> I've been working with JGNAT 1.1p lately on RedHat Linux 6.2 and having
> pretty good success.
>
> However I'm now experiencing a problem with code that does tasking (up
> till now I've been working on single-threaded code, but now it's time to
> start getting concurrent).
>
> Here's a simple example:
>
> --------------------------------
> with Text_IO; use Text_IO;
>
> procedure Simple_Task is
>
> task Simple is
> entry Start;
> end Simple;
>
> task body Simple is
> begin
> select
> accept Start;
> or
> terminate;
> end select;
> end Simple;
>
> begin
> Put_Line("Start...");
> Simple.Start;
> Put_Line("Stop");
> end Simple_Task;
> --------------------------------
>
> With GNAT 3.13p this compiles and runs just fine.
>
> With JGNAT 1.1p it compiles, but when I try to run it I get the
> following JVM error:
>
> Marc say: java simple_task
> Exception in thread "main" java.lang.IllegalMonitorStateException
> at
> jgnat.adalib.system$task_primitives$operations.write_lock__2(s-taprop.adb:229)
> at
> jgnat.adalib.system$task_primitives$operations.lock_all_tasks_list(s-taprop.adb:771)
> at
> jgnat.adalib.system$task_primitives$operations.enter_task(s-taprop.adb:373)
> at
> jgnat.adalib.system$task_primitives$operations.initialize(s-taprop.adb:834)
> at jgnat.adalib.system$tasking._elabb(s-taskin.adb:186)
> at ada_simple_task.adainit(b~simple_task.adb:84)
> at simple_task.main(simple_task.adb)
>
> I'm using the Blackdown distribution of Java for Linux; it's version
> information is:
>
> Marc say: java -version
> java version "1.3.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build
> Blackdown-1.3.0-FCS)
> Java HotSpot(TM) Client VM (build Blackdown-1.3.0-FCS, mixed mode)
>
> I've looked over the JGNAT documentation and tasking is mentioned within
> it, so I wouldn't have expected any intrinsic problems using it. Nor
> did I notice any sort of "init" preparation that had to be done before
> tasking could be used.
>
> Any suggestions or advice would be appreciated!
>
> Marc
Following up on my own message (for posterity's sake :-)...
The problem with tasking arose because I'd moved from JDK 1.2.2 to JDK
1.3, and the JGNAT 1.1p run-time library apparently has fits with that.
When I reset the paths to use the 1.2.2 directory which I still had
installed, everything's worked fine since then. (I'd hand-modified the
PATH in an xterm to test that, but apparently I messed something up and
was getting the same problem.)
So, JGNAT 1.1p seems to be fine with non-tasking Ada software under JDK
1.2.2 or JDK 1.3, but tasking works only with JDK 1.2.2.
Movin' on...
Marc
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-02-23 16:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <3A925758.3D120457@earthlink.net>
2001-02-23 16:05 ` JGNAT and Tasking problem Marc A. Criley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox