Skip to content

Commit 753beb7

Browse files
committed
Various editorial changes
1 parent 6b8b9a5 commit 753beb7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

content/courses/ada-in-practice/chapters/idioms_for_protected_objects.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,8 @@ protected operations provide automatically.
303303
System Implementation of PO Mutual Exclusion
304304
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
305305

306-
The underlying run-time library or RTOS implements the mutual exclusion and
307-
thread management semantics for protected objects. Two approaches are known in
308-
the Ada context.
306+
The underlying run-time library implements the mutual exclusion and
307+
thread management semantics for protected objects. Two approaches are known.
309308

310309
One implementation approach, typical when executing on an operating system,
311310
uses an explicit locking mechanism provided by the OS. The run-time library
@@ -530,7 +529,7 @@ There are issues unaddressed in the three-step client protocol illustrated by
530529
the code above, especially error cases. For example, even if an exception is
531530
raised in step two, we need to ensure that :ada:`Release` is called with
532531
exactly-once semantics. There are other abstractions that address these client
533-
usage issues, namely scope-based locking, but will ignore them here. See the
532+
usage issues, namely scope-based locking, but we'll ignore them here. See the
534533
:ref:`Resource Acquisition Is Initialization <Ada_In_Practice_RAII>` idiom for
535534
the :ada:`Scope_Lock` type.
536535

@@ -662,7 +661,7 @@ other caller currently owns the PO.
662661

663662
The examples so far exist primarily for providing mutual exclusion to code that
664663
includes potentially blocking operations. By no means, however, are these the
665-
most common. Much more powerful abstractions are possible.
664+
only examples. Much more powerful abstractions are possible.
666665

667666
For example, let's say we want to have a notion of *events* that application
668667
tasks can await, suspending until the specified event is *signaled*. At some
@@ -760,7 +759,7 @@ Here's a task that waits for either event :ada:`A` or :ada:`B`, using a global
760759
end A_or_B_Processor;
761760
762761
When the call to :ada:`Wait` returns, at least one of either :ada:`A` or
763-
:ada:`B` has been signaled. One of those signaled events is then selected and
762+
:ada:`B` has been signaled. One of those signaled events was selected and
764763
returned in the :ada:`Enabler` parameter. That selected event is no longer
765764
signaled when the call returns and will stay that way until another call to
766765
procedure :ada:`Signal` changes it. The other event in the list is not
@@ -893,7 +892,8 @@ compile-time visibility to the entry parameters, so the parameters cannot be
893892
referenced in the barriers. This situation calls for a requeue statement.
894893

895894
Because :ada:`Wait` always takes a call, the entry barrier is just hard-coded
896-
to :ada:`True`. (That's always a strong indication that requeue is involved.)
895+
to :ada:`True`. (As mentioned earlier, that's always a strong indication that
896+
requeue is involved.)
897897
Even though this barrier always allows a call, much like a protected procedure,
898898
we must use an entry because only protected entries can requeue callers.
899899

@@ -1420,9 +1420,9 @@ within a generic package, like so:
14201420
with
14211421
Priority => Ceiling
14221422
is
1423-
-- ...
1423+
...
14241424
private
1425-
-- ...
1425+
...
14261426
end Bounded_Buffer;
14271427
14281428
The two discriminants allow the type to be parameterized when clients declare

0 commit comments

Comments
 (0)