diff --git a/vvm/vvm_event.cc b/vvm/vvm_event.cc index afde36794..cece796c7 100644 --- a/vvm/vvm_event.cc +++ b/vvm/vvm_event.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: vvm_event.cc,v 1.3 1999/12/12 19:47:54 steve Exp $" +#ident "$Id: vvm_event.cc,v 1.4 2000/01/06 05:56:22 steve Exp $" #endif # include "vvm.h" @@ -30,6 +30,7 @@ vvm_event::vvm_event() vvm_event::~vvm_event() { + assert(event_ == 0); } void vvm_event::schedule(unsigned long delay) @@ -40,12 +41,16 @@ void vvm_event::schedule(unsigned long delay) void vvm_event::callback_(void*cbd) { vvm_event*obj = reinterpret_cast(cbd); + obj->event_ = 0; obj->event_function(); delete obj; } /* * $Log: vvm_event.cc,v $ + * Revision 1.4 2000/01/06 05:56:22 steve + * Cleanup and some asserts. + * * Revision 1.3 1999/12/12 19:47:54 steve * Remove the useless vvm_simulation class. * diff --git a/vvm/vvm_thread.cc b/vvm/vvm_thread.cc index 5e4e8e71e..d62039ed9 100644 --- a/vvm/vvm_thread.cc +++ b/vvm/vvm_thread.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: vvm_thread.cc,v 1.2 1999/12/12 19:47:54 steve Exp $" +#ident "$Id: vvm_thread.cc,v 1.3 2000/01/06 05:56:23 steve Exp $" #endif # include "vvm.h" @@ -28,7 +28,11 @@ class delay_event : public vvm_event { public: delay_event(vvm_thread*thr) : thr_(thr) { } - void event_function() { while (thr_->go()) /* empty */; } + void event_function() + { + while (thr_->go()) + /* empty */; + } private: vvm_thread*thr_; }; @@ -50,6 +54,9 @@ void vvm_thread::thread_yield(unsigned long delay) /* * $Log: vvm_thread.cc,v $ + * Revision 1.3 2000/01/06 05:56:23 steve + * Cleanup and some asserts. + * * Revision 1.2 1999/12/12 19:47:54 steve * Remove the useless vvm_simulation class. * diff --git a/vvm/vvm_thread.h b/vvm/vvm_thread.h index 15cd48ca0..b16078d79 100644 --- a/vvm/vvm_thread.h +++ b/vvm/vvm_thread.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: vvm_thread.h,v 1.3 1999/12/12 19:47:54 steve Exp $" +#ident "$Id: vvm_thread.h,v 1.4 2000/01/06 05:56:23 steve Exp $" #endif # include "vvm.h" @@ -46,11 +46,13 @@ class vvm_thread { // will return false if it is ready to give up the CPU. virtual bool go() =0; - protected: }; /* * $Log: vvm_thread.h,v $ + * Revision 1.4 2000/01/06 05:56:23 steve + * Cleanup and some asserts. + * * Revision 1.3 1999/12/12 19:47:54 steve * Remove the useless vvm_simulation class. *