package Monitor is

    type Kind is limited private;

    procedure Start_Reading (The_Monitor : in Kind);
    procedure Stop_Reading (The_Monitor : in Kind);

    procedure Start_Writing (The_Monitor : in Kind);
    procedure Stop_Writing (The_Monitor : in Kind);

private
    type Service is (Read, Write);
    task type Kind is
        entry Start (The_Service : in Service);
        entry Stop_Reading;
        entry Stop_Writing;
    end Kind;
end Monitor;