[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

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

1462.0. "Callable DECmcc and event flag waits" by NWACES::KIMMEL () Fri Sep 06 1991 10:49

Hi,

I'm writing an Event Sink module, using V1.1 Callable DECmcc, and I'm
using a system global section and a common event flag cluster to
communicate with the Access Module process.

In the Event Sink code, the only DECmcc routines I will be calling
are mcc_event_put, mcc_mir_create_instance, mcc_mir_read_instance_key,
and the create/acquire/release/delete lock routines.

The main loop of the Event Sink is a SYS$WFLOR call, waiting for
one of several common event flags to be set.

My question is: this SYS$WFLOR call will make the Event Sink hibernate
(at least, that's what happens in my test program) and I'm wondering
if this will cause problems for any of the DECmcc routines that I will
be calling.  Do all of those DECmcc routines complete synchronously?

Thank you,
Cathy
T.RTitleUserPersonal
Name
DateLines
1462.1Please don't do thatTOOK::GUERTINDon't fight fire with flamesMon Sep 09 1991 10:0811
    Waiting for event flags is ILLEGAL.  You should never block the process
    for any reason (however, we trap QIOW's and convert them to QIO's so
    they do not block).  Having said that, it appears as though the only
    thing you would be blocking is the threads package itself (which forks
    off 1 or 2 threads for itself), since there would be no other threads
    running.  It might work.  I'm sure there is a more elegant solution
    out there.  (By the way, the MCC Event Manager itself uses a global
    section, but uses locks instead of Event Flags to communicate, since
    locks will not block.)
    
    -Matt.
1462.2To answer the second question...TOOK::GUERTINDon't fight fire with flamesMon Sep 09 1991 10:255
    Anything which does I/O completes asynchronously at the lower levels,
    but completes synchronously at the higher levels.  That is how thread
    context switching is accomplished in the MTS threads package.
    
    -Matt.
1462.3I'm glad I askedNWACES::KIMMELMon Sep 09 1991 12:434
Thanks for your quick response!  I'll redesign the code to not wait for
event flags.

Cathy