[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECmcc user notes file. Does not replace IPMT. |
Notice: | Use IPMT for problems. Newsletter location in note 6187 |
Moderator: | TAEC::BEROUD |
|
Created: | Mon Aug 21 1989 |
Last Modified: | Wed Jun 04 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 6497 |
Total number of notes: | 27359 |
648.0. "What effect does the arrival of an alert have on a thread?" by SMAUG::DPETERSON () Tue Jan 22 1991 15:36
What effect does the arrival of an alert have on a thread?
Basically I think the SRM says this about alerts.
A thread can "alerted" by the caller of mcc_thread_send_alert().
The target thread discovers the alert by examining the CVR from the
mcc_xxx calls, listed in the SRM, or by calling mcc_thread_test_alert().
There is also a nice discussion about invariants and critical code sections
that can be surrounded by mcc_thread_defer_alert() and
mcc_thread_restore_alert() to prevent the alert notification.
Does this imply, that the arrival of an alert does more than just the
notification, (eg. modify other data , prevent mcc_xxx calls, etc)?
In other words, as long as the alerted thread is responsible and responds
to the alert after insuring consistency on it's invariants and cleaning up
resources, is there any need/requirement to use the defer/restore alerts
routines. Or are they provided to simplify program flow?
T.R | Title | User | Personal Name | Date | Lines |
---|
648.1 | possible self diagnosis | SMAUG::DPETERSON | | Tue Jan 22 1991 16:43 | 5 |
| After further reading, I'm embarrassed.
I believe the answer is:
The arrivial of an alert causes the premature completion of an
alertable mcc_xxx routine. Something you'd clearly like to prevent.
|
648.2 | sounds right | TOOK::HAO | | Wed Jan 23 1991 10:25 | 7 |
| Yes, that's right. Use the defer/restore in parts of your code that
could cause data to be an unstable state if you receive an alert.
Otherwise, if your thread can clean up properly, there is no reason
to defer an alert being received.
Christine
|