Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8054525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:10:10+00:00 2026-06-05T08:10:10+00:00

Consider the following controller (protected object) in Ada95 to adapt that a Task calls

  • 0

Consider the following controller (protected object) in Ada95 to adapt that a Task calls Waiting() this one its not going to be put on waiting if the waiting marker (Marker) corresponds already on the marker of selection (Selecting_Marker) only naturally before it’s initialization:

protected type Controller is
    entry Waiting(Marker : in Marker_Type);
    procedure WakeUp(Marker : in Marker_Type);
private
    Tentative_Count : Natural := 0;
    Selecting_Marker : Marker_Type;
end Controller;

protected body Controller is

    entry Waiting (Marker : in Marker_Type) when Tentative_Count > 0 is
    begin
        Tentative_Count := Tentative_Count - 1;
        if Selecting_Marker /= Marker then 
            requeue Waiting;
        end if;
    end Waiting;

    procedure WakeUp (Marker : in Marker_Type) is
    begin
        Selecting_Marker := Marker;
        Tentative_Count := Waiting'Count;
    end WakeUp;

end Controller;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T08:10:11+00:00Added an answer on June 5, 2026 at 8:10 am

    The object is to alter the behavior of the protected object, likely the following line:

    entry Waiting (Marker : in Marker_Type) when Tentative_Count > 0 is

    I’m not well-versed in protected objects, so won’t offer any more than that except to say you’d probably be better off a) rereading the book’s chapter on protected objects; and b) understanding what the objective of the code is and what the teacher/book is asking.

    Part b is especially important, as in real life you need to be able to translate specifications into an implementation; and oftentimes the exact-wording is at odds with the examples and/or the example/reasoning.

    Additional resources:

    • Ada 95 Rationale: II.9 Protected Types
    • Ada 95 Rationale: 9.1 Protected Types
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I get the 'default' param if not specified? Consider the following: http://localhost/controller/action/id/123
Consider the following image at: http://znood.com/images/801/130x130.jpg I have a controller rendering this image and
Consider following scenario: I have RESTful URL /articles that returns list of articles user
So we have a PHP+Zend Framework+Doctrine 1.2 application that has the following structure: Controller
Consider the following model and controller: public class SimpleModel { [Required(ErrorMessage=Email Address is required.)]
I see that there is Controller.RedirectToAction(string actionName, string controllerName, object values) but I never
Consider the following controller: package test class FirstController { def index = { chain(controller:second,
Consider the following code: Here is my price calculator controller header file. #import <Foundation/Foundation.h>
Consider following entry in my mongo collection. { id : _0001, map : {
Consider following program: static void Main (string[] args) { int i; uint ui; i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.