TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: 100421,2472 (X)
from: Paul N. Leonard 72477,774
date: 1995-05-30 13:22:57
subject: #Alarms `disappearing`

#: 20973 S12/OS9/68000 (OSK)
    30-May-95  13:22:57
Sb: #Alarms 'disappearing'
Fm: Paul N. Leonard 72477,774
To:  100421,2472 (X)

   I just now saw your messages about disapearing alarms.  It is true  that
   you  can unintentionally delete an alarm but it is definitely avoidable.
   Rather than use the sequence sited in your  messages  use  the  sequence
   shown  below  and  you won't have any problems.  You must be consistent,
   however, because if you do it incorrectly in one  place,  you  are  back
   where you started.

      For each alarm that is created set a unique flag to  indicate  it  is
      active.

      When the alarm handler receives that alarm it clears the proper  flag
      to indicate the alarm has fired.

      When it comes time to delete an alarm set the signal mask to  prevent
      alarms from firing.

      Check the status of the flag.
        If it is still set, then it has not fired and you can safely delete
        the alarm and clear the flag.

        If it is clear, then there is no need to clear the  alarm  or  flag
        because it has already fired.

      Clear the signal mask so signals can be received again.

   We are using this scheme on our product which can have up  to  24  tasks
   running at one time of which 10 are creating and deleting alarms a great
   deal of the time.  We had the same problem until we came  up  with  this
   solution and it hasn't been a problem since.

   Hope this helps.

   Paul N. Leonard


There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.