comp.lang.ada
 help / color / mirror / Atom feed
* Use of entries using Ravenscar
@ 2001-12-18 16:28 Jimmy Dubén
  2001-12-20  7:54 ` Jimmy Dubén
  0 siblings, 1 reply; 21+ messages in thread
From: Jimmy Dubén @ 2001-12-18 16:28 UTC (permalink / raw)


Hmm..
How do I use Protected Objects and Entries when using Gnat3.14a1 AND
Ravenscar pragma?
I can't use the entries as I would when not having Ravenscar. It
switches to s-tposen.adb to be able to deal with the Ravenscar
restrictions, but the thing is that I didn't have any problem using
Gnat3.13p.

Can someone please give me a swift answer to this.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-18 16:28 Use of entries using Ravenscar Jimmy Dubén
@ 2001-12-20  7:54 ` Jimmy Dubén
  2001-12-20  8:46   ` martin.m.dowie
  2001-12-20 14:59   ` Stephen Leake
  0 siblings, 2 replies; 21+ messages in thread
From: Jimmy Dubén @ 2001-12-20  7:54 UTC (permalink / raw)


Hmmm.. maybe I should be a little more precise.

Well, more exactly the compiler throws a lot of errors when compiling
my old code.
I've declared a entry in a protected object (this is the only entry in
this PO) with a simple boolean as a "blocker". Now I get compiling
errors everywhere I call this entry.
 
Example of compiler error:
 
Protected_Object.Read;
 >>>expected type 
"System.Tasking.Protected_Objects.Single_Entry.Protection_Entry_Access"
 >>>found type access to subtype of 
"System.Tasking.Protected_Objects.Entries.Protection_Entries"
 >>>==> in call to "Protected_Single_Entry_Call" at s-tposen.adb:232
 
This was not a problem with the old compiler, nor is it a problem
without pragma ravenscar.

Why do I get this problem?
Why did not Gnat3.13p use s-tposen.adb even though it existed for the
purpose of Ravenscar?



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-20  7:54 ` Jimmy Dubén
@ 2001-12-20  8:46   ` martin.m.dowie
  2001-12-20 13:52     ` Jimmy Dubén
  2001-12-20 14:59   ` Stephen Leake
  1 sibling, 1 reply; 21+ messages in thread
From: martin.m.dowie @ 2001-12-20  8:46 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

"Jimmy Dub�n" <jidu2851@student.uu.se> wrote in message
news:4948089f.0112192354.5411f0ed@posting.google.com...
> Protected_Object.Read;
>  >>>expected type
> "System.Tasking.Protected_Objects.Single_Entry.Protection_Entry_Access"
>  >>>found type access to subtype of
> "System.Tasking.Protected_Objects.Entries.Protection_Entries"
>  >>>==> in call to "Protected_Single_Entry_Call" at s-tposen.adb:232

You couldn't provide an actual code example? I've been playing with
the Ravenscar profile for a few months now and have never had any
problem with it.





^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-20  8:46   ` martin.m.dowie
@ 2001-12-20 13:52     ` Jimmy Dubén
  0 siblings, 0 replies; 21+ messages in thread
From: Jimmy Dubén @ 2001-12-20 13:52 UTC (permalink / raw)


> You couldn't provide an actual code example? I've been playing with
> the Ravenscar profile for a few months now and have never had any
> problem with it.

Okidoki.. here goes.
I have three different files below (sorry, I could not send them
along...).
One procedure that uses the PO, and then a package with the PO that
has the entry.
Originally the code was intended to catch a signal but that did not
work with ravenscar either. Strange since I think it is statically
attached.
Pragma(Ravenscar) not shown here (used in gnat.adc next to Makefile)


<<<<<<<<<<<<CODE>>>>>>>>>>>>

>>>>>>>>test_entry.adb

with Ada.Real_Time, Ada.Text_IO, Signal_Handler_Test;
use Ada.Real_Time, Ada.Text_IO, Signal_Handler_Test;

procedure Test_Entry is
   Period        : constant Duration := 5.0;
   Next_Time     : Time;
begin
   loop
      Next_Time := Clock + To_Time_Span (Period);
      delay until Next_Time;

      Protected_Signal_Handler_Test.Read;
   end loop;
end Test_Entry;

>>>>>>>>>signal_handler_test.ads
with
  Ada.Interrupts,
  Ada.Text_IO,
  Ada.Interrupts.Names;

use
  Ada.Interrupts,
  Ada.Text_IO,
  Ada.Interrupts.Names;

package Signal_Handler_Test is

   protected Protected_Signal_Handler_Test is

      --*F
      --* Read entry ...
      --*E
      entry Read;

      --*F
      --* Report that signal USR1 has occured
      --*E
      procedure Something_Arrived;

      -- Attach this certain procedure to the correct signal
      -- NOT ANY MORE
      --pragma Attach_Handler(Something_Arrived, SIGUSR1);

private
      -- Whether or not there is anything to "read"
      Exists_Something   : Boolean := False;
      No_Of_Something   : Integer := 0;


   end Protected_Signal_Handler_Test;

end Signal_Handler_Test;

>>>>>>>>>signal_handler_test.adb

package body Signal_Handler_Test is

   protected body Protected_Signal_Handler_Test is

      
      entry Read when Exists_Something is
      begin

         -- Decrement message counter
         No_Of_Something := No_Of_Something - 1;
         Put_Line("Read: Something is = " & No_Of_Something'img);

         -- (Possibly) allow others to use the entry again
         Exists_Something := No_Of_Something > 0;

      end Read;


      procedure Something_Arrived is
      begin

         Ada.Text_IO.Put_Line("Something_Arrived: A message has
arrived.");

         -- Increment something counter
         No_Of_Something := No_Of_Something + 1;
         Put_Line("Something_Arrived: Something is = " &
No_Of_Something'img);

         -- A something is available now
         Exists_Something := True;

      end Something_Arrived;

   end Protected_Signal_Handler_Test;

end Signal_Handler_Test;

>>>>>>>>>>>>>NO MORE CODE<<<<<<<<<<<<<<

In the system I'm working with we, among other things, want to catch a
signal from a CAN-driver to be able to do a non-blocking read. (We
can't find good drivers to our CAN-module that is working with Linux
2.4.15)



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-20  7:54 ` Jimmy Dubén
  2001-12-20  8:46   ` martin.m.dowie
@ 2001-12-20 14:59   ` Stephen Leake
  2001-12-20 15:14     ` martin.m.dowie
  2001-12-22 12:25     ` Simon Wright
  1 sibling, 2 replies; 21+ messages in thread
From: Stephen Leake @ 2001-12-20 14:59 UTC (permalink / raw)


jidu2851@student.uu.se (Jimmy Dub�n) writes:

> Well, more exactly the compiler throws a lot of errors when compiling
> my old code.
> I've declared a entry in a protected object (this is the only entry in
> this PO) with a simple boolean as a "blocker". Now I get compiling
> errors everywhere I call this entry.
>  
> Example of compiler error:
>  
> Protected_Object.Read;
>  >>>expected type 
> "System.Tasking.Protected_Objects.Single_Entry.Protection_Entry_Access"
>  >>>found type access to subtype of 
> "System.Tasking.Protected_Objects.Entries.Protection_Entries"
>  >>>==> in call to "Protected_Single_Entry_Call" at s-tposen.adb:232
>  
> This was not a problem with the old compiler, nor is it a problem
> without pragma ravenscar.

If I recall correctly, the Ravenscar profile forbids entries. Or maybe
that was only on tasks?

In any case, this is complaining about the internals of the GNAT
runtime system; note the package name "System.Tasking". It could be
you have some object and/or .ali files hanging around from either "the
old compiler" or "compiling without Pragma (Ravenscar)". Try deleting
_everything_, and recompiling from scratch.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-20 14:59   ` Stephen Leake
@ 2001-12-20 15:14     ` martin.m.dowie
  2001-12-20 20:34       ` Jimmy Dub�n
  2001-12-22 12:25     ` Simon Wright
  1 sibling, 1 reply; 21+ messages in thread
From: martin.m.dowie @ 2001-12-20 15:14 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

"Stephen Leake" <stephen.a.leake.1@gsfc.nasa.gov> wrote in message
news:usna67xaf.fsf@gsfc.nasa.gov...
> jidu2851@student.uu.se (Jimmy Dub�n) writes:
>
> If I recall correctly, the Ravenscar profile forbids entries. Or maybe
> that was only on tasks?

Task entries are forbidden but not PO entries but you're only allowed
one queued entry at a time...

> In any case, this is complaining about the internals of the GNAT
> runtime system; note the package name "System.Tasking". It could be
> you have some object and/or .ali files hanging around from either "the
> old compiler" or "compiling without Pragma (Ravenscar)". Try deleting
> _everything_, and recompiling from scratch.

The other thing I noticed was that nothing in the code actually
required this unit to be withed in at all. (true of a couple of other
with's and they certainly don't need to be withed in at the spec
level - with things at as low a level as possible).





^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-20 15:14     ` martin.m.dowie
@ 2001-12-20 20:34       ` Jimmy Dub�n
  2001-12-21 22:47         ` martin.m.dowie
  0 siblings, 1 reply; 21+ messages in thread
From: Jimmy Dub�n @ 2001-12-20 20:34 UTC (permalink / raw)


> > If I recall correctly, the Ravenscar profile forbids entries. Or maybe
> > that was only on tasks?
>
> Task entries are forbidden but not PO entries but you're only allowed
> one queued entry at a time...

But this surely does only have one queued entry, right?

>
> > In any case, this is complaining about the internals of the GNAT
> > runtime system; note the package name "System.Tasking". It could be
> > you have some object and/or .ali files hanging around from either "the
> > old compiler" or "compiling without Pragma (Ravenscar)". Try deleting
> > _everything_, and recompiling from scratch.
>
> The other thing I noticed was that nothing in the code actually
> required this unit to be withed in at all. (true of a couple of other
> with's and they certainly don't need to be withed in at the spec
> level - with things at as low a level as possible).

How can that affect the compiler errors?






^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-20 20:34       ` Jimmy Dub�n
@ 2001-12-21 22:47         ` martin.m.dowie
  2001-12-22  1:52           ` Jimmy Dub�n
  0 siblings, 1 reply; 21+ messages in thread
From: martin.m.dowie @ 2001-12-21 22:47 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1241 bytes --]

"Jimmy Dub�n" <duben@fatburen.org> wrote in message
news:9vti1h$183d$1@not.sics.se...
> > Task entries are forbidden but not PO entries but you're only allowed
> > one queued entry at a time...
>
> But this surely does only have one queued entry, right?

One entry but my understanding of Ravenscar is that only
1 task may be queued on this single entry at any one time, so
without the rest of your code, we can't make any judgement
on that.


> > The other thing I noticed was that nothing in the code actually
> > required this unit to be withed in at all. (true of a couple of other
> > with's and they certainly don't need to be withed in at the spec
> > level - with things at as low a level as possible).
>
> How can that affect the compiler errors?

Well, I've never seen it with GNAT but I did come across another
compiler which would did have some strange ideas about what to
compile :-) That was a couple of years ago and there have definately
been new releases of that compiler, so I can say if these "features"
are still there!

I presume you are using a Unix/Linux machine? On Win32 there is
a complaint about trying to attach the ISR but no sign of your original
problem, with or without the spurious "with"s. Sorry :-(






^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-21 22:47         ` martin.m.dowie
@ 2001-12-22  1:52           ` Jimmy Dub�n
  2001-12-22 15:27             ` martin.m.dowie
  0 siblings, 1 reply; 21+ messages in thread
From: Jimmy Dub�n @ 2001-12-22  1:52 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1729 bytes --]


"martin.m.dowie" <martin.m.dowie@ntlworld.com> skrev i meddelandet
news:Y0PU7.16177$4z5.1732281@news6-win.server.ntlworld.com...
> "Jimmy Dub�n" <duben@fatburen.org> wrote in message
> news:9vti1h$183d$1@not.sics.se...
> > > Task entries are forbidden but not PO entries but you're only allowed
> > > one queued entry at a time...
> >
> > But this surely does only have one queued entry, right?
>
> One entry but my understanding of Ravenscar is that only
> 1 task may be queued on this single entry at any one time, so
> without the rest of your code, we can't make any judgement
> on that.

This is not a part of the code that is running in the system, it is just a
small subset of the code that is similar to the real code, however it does
not work!

>
>
> > > The other thing I noticed was that nothing in the code actually
> > > required this unit to be withed in at all. (true of a couple of other
> > > with's and they certainly don't need to be withed in at the spec
> > > level - with things at as low a level as possible).
> >
> > How can that affect the compiler errors?
>
> Well, I've never seen it with GNAT but I did come across another
> compiler which would did have some strange ideas about what to
> compile :-) That was a couple of years ago and there have definately
> been new releases of that compiler, so I can say if these "features"
> are still there!
>
> I presume you are using a Unix/Linux machine? On Win32 there is
> a complaint about trying to attach the ISR but no sign of your original
> problem, with or without the spurious "with"s. Sorry :-(
>

What? Am I understanding you correctly that you don'tget any compiler errors
when you are compiling these files with pragma Ravenscar ???!







^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-20 14:59   ` Stephen Leake
  2001-12-20 15:14     ` martin.m.dowie
@ 2001-12-22 12:25     ` Simon Wright
  2001-12-23 18:48       ` Jimmy Dub�n
  2001-12-23 20:01       ` Stephen Leake
  1 sibling, 2 replies; 21+ messages in thread
From: Simon Wright @ 2001-12-22 12:25 UTC (permalink / raw)


Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov> writes:

> In any case, this is complaining about the internals of the GNAT
> runtime system; note the package name "System.Tasking". It could be
> you have some object and/or .ali files hanging around from either
> "the old compiler" or "compiling without Pragma (Ravenscar)". Try
> deleting _everything_, and recompiling from scratch.

The example gives the same error messages under 3.14a1.

Ravenscar is (implemented as) a set of restrictions, and it turns out
that the problem shows up only if you have all three of

  pragma Restrictions (No_Abort_Statements);
  pragma Restrictions (No_Entry_Queue);
  pragma Restrictions (Max_Asynchronous_Select_Nesting => 0);

The listing produced with -gnatDG is

  with ada;
  with ada;
  with ada.ada__real_time;
  with ada.ada__text_io;
  with signal_handler_test;
  use ada.ada__real_time, ada.ada__text_io, signal_handler_test;
  with ada.ada__real_time.ada__real_time__delays;
  with system;
  with system.system__tasking;
  with system.system__tasking.system__tasking__protected_objects.
    system__tasking__protected_objects__single_entry;

  procedure test_entry is
     period : constant duration := 500000000.0E-8;
     next_time : ada__real_time__time;
     L_1 : label
  begin
     L_1 : loop
	next_time := ada__real_time__Oadd (ada__real_time__clock, 
	  ada__real_time__to_time_span (period));
	ada__real_time__delays__delay_until (next_time);
	B1b : declare
	begin

	     system__tasking__protected_objects__single_entry__protected_single_entry_call 
	     (signal_handler_test__protected_signal_handler_testTV!(
	     signal_handler_test__protected_signal_handler_test)._object'
	     unchecked_access, system__null_address, 
	     system__tasking__simple_call);
	end B1b;
     end loop L_1;
  end test_entry;

which is a lot simpler than what's generated without Ravenscar.

This really does look like a candidate for support from those who know
what they're talking about!



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-22  1:52           ` Jimmy Dub�n
@ 2001-12-22 15:27             ` martin.m.dowie
  2001-12-22 22:56               ` Jimmy Dub�n
  0 siblings, 1 reply; 21+ messages in thread
From: martin.m.dowie @ 2001-12-22 15:27 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]

"Jimmy Dub�n" <duben@fatburen.org> wrote in message
news:a00p23$lt8$1@not.sics.se...
> > I presume you are using a Unix/Linux machine? On Win32 there is
> > a complaint about trying to attach the ISR but no sign of your original
> > problem, with or without the spurious "with"s. Sorry :-(
>
> What? Am I understanding you correctly that you don'tget any compiler
errors
> when you are compiling these files with pragma Ravenscar ???!

'Fraid so! (other than the aforementioned error on
'pragma Attach_Handler') 4 warnings about not using
anything in the units 'with'-ed but other than that a clean
compile (after commenting out the 'pragma Attach...').

I'm using Win32 GNAT 3.13p (20000509) with options
"-gnatybefhik -gnato -gnatv" I also tried the other options
"-gnaty -gnato -gnatv -gnatwe -gnatwl -gnatwu". There
is a fair bit of 'tidying' to do to keep GNAT happy about
formating but again a clean compilation/link occurs.

I don't understand why you are trying to use these
packages directly - aren't they just there for the benefit
of the compiler? (Though I'm guessing that it isn't the
use of them directly that is causing the problem - dodgy
installation of GNAT maybe?)








^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-22 15:27             ` martin.m.dowie
@ 2001-12-22 22:56               ` Jimmy Dub�n
  2001-12-23 11:02                 ` martin.m.dowie
  0 siblings, 1 reply; 21+ messages in thread
From: Jimmy Dub�n @ 2001-12-22 22:56 UTC (permalink / raw)


> > > I presume you are using a Unix/Linux machine? On Win32 there is
> > > a complaint about trying to attach the ISR but no sign of your
original
> > > problem, with or without the spurious "with"s. Sorry :-(
> >

Yes, we're working with Linux2.14 (or so) and UNIX.

> > What? Am I understanding you correctly that you don'tget any compiler
> errors
> > when you are compiling these files with pragma Ravenscar ???!
>
> 'Fraid so! (other than the aforementioned error on
> 'pragma Attach_Handler') 4 warnings about not using
> anything in the units 'with'-ed but other than that a clean
> compile (after commenting out the 'pragma Attach...').
>
> I'm using Win32 GNAT 3.13p (20000509) with options
> "-gnatybefhik -gnato -gnatv" I also tried the other options
> "-gnaty -gnato -gnatv -gnatwe -gnatwl -gnatwu". There
> is a fair bit of 'tidying' to do to keep GNAT happy about
> formating but again a clean compilation/link occurs.

Hmmm, OK - as I said in my original question this problem occured when I
switched to the new compiler 3.14a1 that we're (suddenly) supposed to use in
the project I'm working on.
(Project description (for the interested):
http://www.docs.uu.se/robocup/DVP2001/)
And I'm aware of the warnings I get for my hideous code:-)
So I do not have these problems with 3.13p, but unfortunately we must use
this new one.

How do one attach a procedure to a signal with Ravenscar? I know that one
can do it, if it is done statically but somehow that's not what I'm doing.

>
> I don't understand why you are trying to use these
> packages directly - aren't they just there for the benefit
> of the compiler? (Though I'm guessing that it isn't the
> use of them directly that is causing the problem - dodgy
> installation of GNAT maybe?)
>

Well, the with of System.Tasking.Protected_Objects.Single_Entry should not
be there, I did put them there to see if that should solve my problem.


Anyway, thank you for the help you have been trying to provide.
I appreciate it since it is my first semester with Ada.





^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-22 22:56               ` Jimmy Dub�n
@ 2001-12-23 11:02                 ` martin.m.dowie
  0 siblings, 0 replies; 21+ messages in thread
From: martin.m.dowie @ 2001-12-23 11:02 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 808 bytes --]

"Jimmy Dub�n" <duben@fatburen.org> wrote in message
news:a046us$74v$1@not.sics.se...
> Hmmm, OK - as I said in my original question this problem occured when I
> switched to the new compiler 3.14a1 that we're (suddenly) supposed to use
in
> the project I'm working on.
> (Project description (for the interested):
> http://www.docs.uu.se/robocup/DVP2001/)
> And I'm aware of the warnings I get for my hideous code:-)
> So I do not have these problems with 3.13p, but unfortunately we must use
> this new one.
>
> How do one attach a procedure to a signal with Ravenscar? I know that one
> can do it, if it is done statically but somehow that's not what I'm doing.

If you have 3.14a1 then presumably you can get support from ACT - I'd
get on to them, they've always had a good reputation for support.






^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-22 12:25     ` Simon Wright
@ 2001-12-23 18:48       ` Jimmy Dub�n
  2001-12-26 18:02         ` Simon Wright
  2001-12-23 20:01       ` Stephen Leake
  1 sibling, 1 reply; 21+ messages in thread
From: Jimmy Dub�n @ 2001-12-23 18:48 UTC (permalink / raw)


>...
>...
>
>
> which is a lot simpler than what's generated without Ravenscar.
>
> This really does look like a candidate for support from those who know
> what they're talking about!

How should one contact ACT with this matter?
Should one send code along?





^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-22 12:25     ` Simon Wright
  2001-12-23 18:48       ` Jimmy Dub�n
@ 2001-12-23 20:01       ` Stephen Leake
  2001-12-24  8:52         ` Jimmy Dub�n
  1 sibling, 1 reply; 21+ messages in thread
From: Stephen Leake @ 2001-12-23 20:01 UTC (permalink / raw)


Simon Wright <simon@pushface.org> writes:

> Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov> writes:
> 
> > In any case, this is complaining about the internals of the GNAT
> > runtime system; note the package name "System.Tasking". It could be
> > you have some object and/or .ali files hanging around from either
> > "the old compiler" or "compiling without Pragma (Ravenscar)". Try
> > deleting _everything_, and recompiling from scratch.
> 
> The example gives the same error messages under 3.14a1.

Ok. Since you have access to 3.14a1, you have access to ACT support.
Although I'm not sure what's available for a University account.
But you should definitely send this in to ACT; you may need to have
your professor send it in for you.

You should also do a _complete_ uninstall of GNAT 3.13p and GNAT
3.14a1, reinstall GNAT 3.14a1, and compile this again. I still think
you have an installation problem, especially since someone else
managed a clean compile with 3.14a1.

And tell your professor that it is more important to use a compiler
that _works_ for _your_ code, than one that has a higher version number!

Good luck.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-23 20:01       ` Stephen Leake
@ 2001-12-24  8:52         ` Jimmy Dub�n
  2001-12-26 18:20           ` Simon Wright
  0 siblings, 1 reply; 21+ messages in thread
From: Jimmy Dub�n @ 2001-12-24  8:52 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2448 bytes --]

> Ok. Since you have access to 3.14a1, you have access to ACT support.
> Although I'm not sure what's available for a University account.
> But you should definitely send this in to ACT; you may need to have
> your professor send it in for you.
>
> You should also do a _complete_ uninstall of GNAT 3.13p and GNAT
> 3.14a1, reinstall GNAT 3.14a1, and compile this again. I still think
> you have an installation problem, especially since someone else
> managed a clean compile with 3.14a1.
>
> And tell your professor that it is more important to use a compiler
> that _works_ for _your_ code, than one that has a higher version number!

You have a point here, but I must admit that I created the testfiles to
isolate another problem we had. The thing is that if I run the code without
Ravenscar and with GNAT3.13p the entry is working improperly. When we run
the code the task starts and the procedure will try to read (using the entry
read in signal_handler_test, see earlier posting). As long as I have sent a
signal to the attached procedure the "blocker" will be true and the read is
ok, but if I the procedure calls the entry and the blocker is false it will
block 4ever. I.e. if I after it has been blocked I send a signal and the
blocker gets true again the procedure will not wake up again.

Do you have any idea why this is the case? We thought that there was perhaps
some kind off minor fault in the runtime-lib so thats why we wanted to
switch compiler. The other reason for switching compiler is that we will
hand this project over to a new group of students in two weeks, and they
would probably appreciate if they could work with the newest compiler that
has been installed at the university.

In the system code we need this so that a driver we have could signal to a
P.O. and we can do a read from it. But we noticed that if we didn't send the
driver something in a while that the system halted (more or less, it is
alive but seems to sleep at the entry).

OK, I know that this is a another problem, but with the same code, so if
someone is running a Linux machine could you please download the file
http://www.csd.uu.se/~jidu2851/argus/testsignal.tar.gz and try this one out.
Is it again something that is corrupt local?

Thankful 4 all your help ...

~~~~~ Regards Jimmy Dub�n ~~~~~

   Project Manager: Robocup Argus HT2001
   duben@fatburen.org
   jidu2851@student.uu.se
   ICQ: 25 46 42 13
   GSM: +46 (0)70 4 61 16 13






^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-23 18:48       ` Jimmy Dub�n
@ 2001-12-26 18:02         ` Simon Wright
  0 siblings, 0 replies; 21+ messages in thread
From: Simon Wright @ 2001-12-26 18:02 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

"Jimmy Dub�n" <duben@fatburen.org> writes:

> >...
> >...
> >
> >
> > which is a lot simpler than what's generated without Ravenscar.
> >
> > This really does look like a candidate for support from those who know
> > what they're talking about!
> 
> How should one contact ACT with this matter?
> Should one send code along?

sales@gnat.com. The deal is (I think) that you get support if you pay
for it, but there is an evaluation scheme.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-24  8:52         ` Jimmy Dub�n
@ 2001-12-26 18:20           ` Simon Wright
  2001-12-27 10:57             ` Jimmy Dub�n
  2001-12-27 11:11             ` Florian Weimer
  0 siblings, 2 replies; 21+ messages in thread
From: Simon Wright @ 2001-12-26 18:20 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 615 bytes --]

"Jimmy Dub�n" <duben@fatburen.org> writes:

> OK, I know that this is a another problem, but with the same code,
> so if someone is running a Linux machine could you please download
> the file http://www.csd.uu.se/~jidu2851/argus/testsignal.tar.gz and
> try this one out.  Is it again something that is corrupt local?

With 3.13p I get either
  raised PROGRAM_ERROR : Interrupt 10 is reserved
or
  signal_handler_test.ads:34:07: interrupts not supported with restricted runtime

(the second with pragma Ravenscar).

These are Linux (Slackware 7.1, kernel 2.2.16, libc-2.1.3). I expect I
built GNAT from source.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-26 18:20           ` Simon Wright
@ 2001-12-27 10:57             ` Jimmy Dub�n
  2001-12-28 18:36               ` Simon Wright
  2001-12-27 11:11             ` Florian Weimer
  1 sibling, 1 reply; 21+ messages in thread
From: Jimmy Dub�n @ 2001-12-27 10:57 UTC (permalink / raw)


 > > OK, I know that this is a another problem, but with the same code,
> > so if someone is running a Linux machine could you please download
> > the file http://www.csd.uu.se/~jidu2851/argus/testsignal.tar.gz and
> > try this one out.  Is it again something that is corrupt local?
>
> With 3.13p I get either
>   raised PROGRAM_ERROR : Interrupt 10 is reserved
> or
>   signal_handler_test.ads:34:07: interrupts not supported with restricted
runtime
>
> (the second with pragma Ravenscar).
>
> These are Linux (Slackware 7.1, kernel 2.2.16, libc-2.1.3). I expect I
> built GNAT from source.

OK, but signal 10 is reserved if you use rts-native instead of rts-fsu, we
have used the latter one since we think it has better handling for threads.
One has to change the soft link between the two libraries to use rts-fsu.





^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-26 18:20           ` Simon Wright
  2001-12-27 10:57             ` Jimmy Dub�n
@ 2001-12-27 11:11             ` Florian Weimer
  1 sibling, 0 replies; 21+ messages in thread
From: Florian Weimer @ 2001-12-27 11:11 UTC (permalink / raw)


Simon Wright <simon@pushface.org> writes:

> With 3.13p I get either
>   raised PROGRAM_ERROR : Interrupt 10 is reserved

> These are Linux (Slackware 7.1, kernel 2.2.16, libc-2.1.3).

On GNU/Linux, interrupt 10 is SIGUSR1, which was once used by the
POSIX Threads implementation (I'm not sure if it still is, though).



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Use of entries using Ravenscar
  2001-12-27 10:57             ` Jimmy Dub�n
@ 2001-12-28 18:36               ` Simon Wright
  0 siblings, 0 replies; 21+ messages in thread
From: Simon Wright @ 2001-12-28 18:36 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 613 bytes --]

"Jimmy Dub�n" <duben@fatburen.org> writes:

> OK, but signal 10 is reserved if you use rts-native instead of
> rts-fsu, we have used the latter one since we think it has better
> handling for threads.  One has to change the soft link between the
> two libraries to use rts-fsu.

The most common reason I have for using tasks is to handle
asynchronous (usually socket) I/O, and it's really useful to be able
to have one task block on a read() while the rest of the program
carries on. So FSU threads are not practical (for us).

I have no idea whether GNAT supports FSU threads *and* Ravenscar --
anyone else?



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2001-12-28 18:36 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-18 16:28 Use of entries using Ravenscar Jimmy Dubén
2001-12-20  7:54 ` Jimmy Dubén
2001-12-20  8:46   ` martin.m.dowie
2001-12-20 13:52     ` Jimmy Dubén
2001-12-20 14:59   ` Stephen Leake
2001-12-20 15:14     ` martin.m.dowie
2001-12-20 20:34       ` Jimmy Dub�n
2001-12-21 22:47         ` martin.m.dowie
2001-12-22  1:52           ` Jimmy Dub�n
2001-12-22 15:27             ` martin.m.dowie
2001-12-22 22:56               ` Jimmy Dub�n
2001-12-23 11:02                 ` martin.m.dowie
2001-12-22 12:25     ` Simon Wright
2001-12-23 18:48       ` Jimmy Dub�n
2001-12-26 18:02         ` Simon Wright
2001-12-23 20:01       ` Stephen Leake
2001-12-24  8:52         ` Jimmy Dub�n
2001-12-26 18:20           ` Simon Wright
2001-12-27 10:57             ` Jimmy Dub�n
2001-12-28 18:36               ` Simon Wright
2001-12-27 11:11             ` Florian Weimer

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