Re: protected type interrupts



REH wrote:

I don't understand. How can a procedure within a protected object
modify data internal to the object in a thread-safe way without the
potentially blocking effect of enforcing mutual exclusion? If one task
is "using" the object, and another calls one of the object's
procedures, would the second task not be blocked until the first one
exits the object?

In the terms of the ARM, mutual exclusion is not considered potentially blocking. Only waiting for data synchronization is potentially blocking. Since protected actions are supposed to be short and quick, and cannot perform potentially blocking operations, mutual exclusion cannot delay a task for very long. On the other hand, waiting for an entry barrier to become true can take forever.

Many external actions, such as I/O, are also considered potentially blocking.

--
Jeff Carter
"Now go away or I shall taunt you a second time."
Monty Python & the Holy Grail
07
.