This is the mail archive of the sid@sources.redhat.com mailing list for the SID project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch - sid/include/sidcpuutil.h


Hi,

The attached patch makes the function basic_cpu::stepped virtual and 
public. This allows it to be overridden by a derived class so that the 
value passed to it may be evaluated and perhaps changed before being 
driven on the step_cycles_pin. One purpose for this might be to allow 
the component to unschedule itself by driving a value of 0.

This has been approved by Franck Eigler and committed.

Dave
Index: sid/include/sidcpuutil.h
===================================================================
RCS file: /cvs/cvsfiles/devo/sid/include/sidcpuutil.h,v
retrieving revision 1.18
diff -c -p -r1.18 sidcpuutil.h
*** sidcpuutil.h	2001/03/01 19:18:07	1.18
--- sidcpuutil.h	2001/03/23 21:19:21
*************** namespace sidutil
*** 233,245 ****
        {
  	this->yield ();
        }
! 
!   protected:
!     virtual void step_insns () = 0;
!     void stepped (sid::host_int_4 n)
        {
  	this->step_cycles_pin.drive (n);
        }
      bool stop_after_insns_p (sid::host_int_4 num)
        {
  	this->current_step_insn_count += num;
--- 233,245 ----
        {
  	this->yield ();
        }
!     virtual void stepped (sid::host_int_4 n)
        {
  	this->step_cycles_pin.drive (n);
        }
+ 
+   protected:
+     virtual void step_insns () = 0;
      bool stop_after_insns_p (sid::host_int_4 num)
        {
  	this->current_step_insn_count += num;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]