cvsuser     03/12/27 03:40:55

  Modified:    dynoplibs alarm.pasm
               src      events.c interpreter.c tsq.c
  Log:
  event-handling-10
  * an initial timed event wasnt properly signaled and missed some times
  * add some comments
  
  Revision  Changes    Path
  1.3       +2 -2      parrot/dynoplibs/alarm.pasm
  
  Index: alarm.pasm
  ===================================================================
  RCS file: /cvs/public/parrot/dynoplibs/alarm.pasm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- alarm.pasm        16 Dec 2003 11:33:07 -0000      1.2
  +++ alarm.pasm        27 Dec 2003 11:40:52 -0000      1.3
  @@ -3,7 +3,7 @@
   
       loadlib P1, "myops_ops"
       find_global P0, "_alarm"
  -    alarm 3.5, P0
  +    alarm 2.0, P0
       set I0, 1
   loop:
       sleep 1
  @@ -11,7 +11,7 @@
       print "\n"
       inc I0
       # check_events
  -    le I0, 5, loop
  +    le I0, 3, loop
       print "done.\n"
       end
   .pcc_sub _alarm:
  
  
  
  1.16      +5 -4      parrot/src/events.c
  
  Index: events.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/events.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -w -r1.15 -r1.16
  --- events.c  23 Dec 2003 09:57:37 -0000      1.15
  +++ events.c  27 Dec 2003 11:40:55 -0000      1.16
  @@ -1,7 +1,7 @@
   /* events.c
    *  Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
    *  CVS Info
  - *     $Id: events.c,v 1.15 2003/12/23 09:57:37 leo Exp $
  + *     $Id: events.c,v 1.16 2003/12/27 11:40:55 leo Exp $
    *  Overview:
    *     Event handling stuff
    *  Data Structure and Algorithms:
  @@ -58,7 +58,7 @@
        */
   #ifdef SIGFPE
       /*
  -     * SIGFPE is architecture specific - some singal an error
  +     * SIGFPE is architecture specific - some signal an error
        * some don't, so we have to use direct checks if we are dividing
        * by zero
        */
  @@ -228,7 +228,7 @@
           }
           else {
               /* we shouldn't get here probably */
  -            internal_exception(1, "Spurious event is event queue");
  +            internal_exception(1, "Spurious event in event queue");
           }
           /*
            * one or more entries arrived - we hold the mutex again
  @@ -327,7 +327,8 @@
                   break;
               case EVENT_TYPE_TIMER:
                   /* run ops, save registers */
  -                Parrot_runops_fromc_save(interpreter, event->u.timer_event.sub);
  +                Parrot_runops_fromc_save(interpreter,
  +                        event->u.timer_event.sub);
                   break;
               default:
                   fprintf(stderr, "Unhandled event type %d\n", event->type);
  
  
  
  1.247     +4 -1      parrot/src/interpreter.c
  
  Index: interpreter.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/interpreter.c,v
  retrieving revision 1.246
  retrieving revision 1.247
  diff -u -w -r1.246 -r1.247
  --- interpreter.c     22 Dec 2003 15:32:02 -0000      1.246
  +++ interpreter.c     27 Dec 2003 11:40:55 -0000      1.247
  @@ -1,7 +1,7 @@
   /* interpreter.c
    *  Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
    *  CVS Info
  - *     $Id: interpreter.c,v 1.246 2003/12/22 15:32:02 leo Exp $
  + *     $Id: interpreter.c,v 1.247 2003/12/27 11:40:55 leo Exp $
    *  Overview:
    *     The interpreter api handles running the operations
    *  Data Structure and Algorithms:
  @@ -1503,6 +1503,9 @@
   /*
    * replace func table with one that does event checking for all
    * opcodes
  + * NOTE: enable_event_checking is called async by the event handler
  + *       thread. All action done from here has to be async safe.
  + *
    * XXX plain core only
    */
   void
  
  
  
  1.12      +2 -2      parrot/src/tsq.c
  
  Index: tsq.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/tsq.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -w -r1.11 -r1.12
  --- tsq.c     19 Dec 2003 12:49:22 -0000      1.11
  +++ tsq.c     27 Dec 2003 11:40:55 -0000      1.12
  @@ -1,7 +1,7 @@
   /* tsq.c
    *  Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
    *  CVS Info
  - *     $Id: tsq.c,v 1.11 2003/12/19 12:49:22 leo Exp $
  + *     $Id: tsq.c,v 1.12 2003/12/27 11:40:55 leo Exp $
    *  Overview:
    *     Thread-safe queues
    *  Data Structure and Algorithms:
  @@ -122,7 +122,6 @@
               queue->tail = entry;
       }
       entry->next = cur;
  -    queue_signal(queue);
   }
   
   void
  @@ -130,6 +129,7 @@
   {
       queue_lock(queue);
       nosync_insert_entry(queue, entry);
  +    queue_signal(queue);
       queue_unlock(queue);
   }
   
  
  
  

Reply via email to