From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dc89792b5613be6a X-Google-Attributes: gid103376,public From: "Michael Hartsough" Subject: Re: Converting Ada Tasks To VxWorks Tasks? Date: 2000/04/15 Message-ID: #1/1 X-Deja-AN: 611501848 References: <1crJ4.142$d21.18564@elnws01> <8d5ivg$ho9$1@nnrp1.deja.com> <38F79478.5218D61@averstar.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Trace: elnws01 955804596 24.29.206.244 (Sat, 15 Apr 2000 08:16:36 CDT) Organization: MediaOne Express -=- Central Region X-MSMail-Priority: Normal NNTP-Posting-Date: Sat, 15 Apr 2000 08:16:36 CDT Newsgroups: comp.lang.ada Date: 2000-04-15T00:00:00+00:00 List-Id: "Tucker Taft" wrote in message news:38F79478.5218D61@averstar.com... > > Most Ada run-times are built on just a few low-level primitives of the > underlying system, in part because the required high-level Ada semantics > rarely match exactly the high-level primitives provided by a given > RTOS. I knew it had to be possible since several compiler vendors provide Ada compilers for VxWorks. > As far as select statements, these require some relatively complex > data structures built up by the Ada run-time system, plus some > fairly low level signaling primitives (e.g. binary semaphores, > event flags, etc.) provided by the underlying RTOS. I was hoping it would be much simpler than this. I started freaking out when my approach started looking like a semaphore tango, but maybe it wasn't that bad after all! "The client task first executes a Give of the Service_Request semaphore, on which the server task has executed a Take. When no clients are requesting service the server task will be blocked. The client task will then execute a Take of the Service_Granted semaphore. All client tasks will be blocked on this semaphore until the server task unblocks on the Service_Request semaphore and executes a Give on the Service_Granted semaphore. This Give will unblock the highest-priority client task which will then place the entry parameters into a static global structure.....". > Since the GNAT run-time is open source, you could conceivably > just go and read the implementation for select statements, etc. > and figure out what you need to do. It is straightforward, > but far from trivial... Great idea! I'll go look for it! > I might put in a plug for our Ada 95 compiler that uses optimized ANSI C > as its intermediate language. This would allow you to > reuse the existing Ada code, and easily interface with > C/C++ code, and give your boss some readable C code to study > when he is curious what you are doing... I've already forwarded your message to my "work address" so I can pass it around on Monday. But, as I've already mentioned, "Ada" has become an evil word where I work. A couple weeks ago I submitted a library purchase request for an SEI paper on Ada (I think it was the "comparison of Ada to C" paper) to my manager for her signature. She refused to sign it because she has been forbidden from approving purchase of anything with the word "Ada" in the title. And these things cost only about $7!! So they won't be thrilled at the prospect of having to purchase an Ada 95 compiler. ;^( Thanks for the help! Michael