comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Help! (Ada/Integrity/PEG)
Date: Tue, 25 Dec 2001 03:20:25 GMT
Date: 2001-12-25T03:20:25+00:00	[thread overview]
Message-ID: <ZfSV7.7307$Sa5.40333@rwcrnsc53> (raw)
In-Reply-To: 20011224164545.047b68e6.nospam@attbi.com

> 2.  As either task can insert information into the qeue, I use a semaphore
> to control when either task can access.  A semaphore is a concept from the
> Unix world ...
  If I understand what you're doing, an Ada "protected record" would be
just the ticket here.  The queue data is hidden inside and the routines
to insert/remove items are visible, but only one routine is allowed to
execute at a time, so two tasks can't step on each other's feet.
Essentially you let the compiler handle the semaphore for you, making
your life simpler and less subject to mistakes, and the compiler
run-time probably does the job more efficiently.



  reply	other threads:[~2001-12-25  3:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-21 15:31 Help! (Ada/Integrity/PEG) TAMS Team
2001-12-21 15:35 ` Mr. Caffiene
2001-12-24  9:58   ` TAMS Team
2001-12-24 21:41     ` Mr. Caffiene
2001-12-25  3:20       ` tmoran [this message]
2001-12-25 10:35         ` Mr. Caffiene
replies disabled

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