[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: node name



In the change log, I found this:

     * [GN] Thursday, Jun 19 16:03:23 PDT 1997
       Minor enhancement to scheduler to make debugging easier by using
       the uid_ field of each event: positive uid_: inside the scheduling
       queue negative uid_: NOT in the scheduling queue
   

Hope this helps?


Kannan


At 09:48 PM 11/18/97 -0500, Shaogang Chen wrote:
>A quick question. The following is a fragment from scheduler.cc
>My question is why          
>
>     p->uid_ = - p->uid_;
>
>What does it mean?
>
>
>void ListScheduler::run()
>{ 
>        /*XXX*/
>        instance_ = this;
>        while (queue_ != 0 && !halted_) {
>          //printf("got here, ");
>                Event* p = queue_;
>                queue_ = p->next_;
>                clock_ = p->time_;
>                //printf("clock_ %f, before p->uid_:%d,", clock_, p->uid_);
>                p->uid_ = - p->uid_;
>                //printf("after p->uid_:%d,", p->uid_);
>                p->handler_->handle(p);
>                //printf("queue%d, halted%d\n",queue_, halted_);
>        }
>}
>
>
>--Shaogang 
>============================================================================
>Email:   [email protected]          Address: 1285 E.E. Bldg., Box
093    
>Web: http://yake.ecn.purdue.edu/~shaogang          Purdue University
>Office:  MSEE 292  Phone: (765) 496-1655           W. Lafayette, IN 47907
>============================================================================
>
>