[vmkit-commits] [vmkit] r61489 - /vmkit/trunk/include/mvm/Threads/Thread.h

Nicolas Geoffray nicolas.geoffray at lip6.fr
Tue Dec 30 04:17:36 PST 2008


Author: geoffray
Date: Tue Dec 30 06:17:04 2008
New Revision: 61489

URL: http://llvm.org/viewvc/llvm-project?rev=61489&view=rev
Log:
Commentify.


Modified:
    vmkit/trunk/include/mvm/Threads/Thread.h

Modified: vmkit/trunk/include/mvm/Threads/Thread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Threads/Thread.h?rev=61489&r1=61488&r2=61489&view=diff

==============================================================================
--- vmkit/trunk/include/mvm/Threads/Thread.h (original)
+++ vmkit/trunk/include/mvm/Threads/Thread.h Tue Dec 30 06:17:04 2008
@@ -15,31 +15,57 @@
 #include "MvmGC.h"
 
 
-class Collector;
-
 namespace mvm {
 
 class VirtualMachine;
 
+/// CircularBase - This class represents a circular list. Classes that extend
+/// this class automatically place their instances in a circular list.
+///
 class CircularBase {
+  /// _next - The next object in the list.
+  ///
 	CircularBase	*_next;
+
+  /// _prev - The previous object in the list.
+  ///
 	CircularBase	*_prev;
 public:
+
+  /// next - Get the next object in the list.
+  ///
 	inline CircularBase *next() { return _next; }
+
+  /// prev - Get the previous object in the list.
+  ///
 	inline CircularBase *prev() { return _prev; }
 
+  /// next - Set the next object in the list.
+  ///
 	inline void next(CircularBase *n) { _next = n; }
+
+  /// prev - Set the previous object in the list.
+  ///
 	inline void prev(CircularBase *p) { _prev = p; }
 
+  /// CricularBase - Creates the object as a single element in the list.
+  ///
 	inline CircularBase() { alone(); }
+
+  /// CircularBase - Creates the object and place it in the given list.
+  ///
 	inline explicit CircularBase(CircularBase *p) { append(p); }
 
+  /// remove - Remove the object from its list.
+  ///
 	inline void remove() { 
 		_prev->_next = _next; 
 		_next->_prev = _prev;
 		alone();
 	}
 
+  /// append - Add the object in the list.
+  ///
 	inline void append(CircularBase *p) { 
 		_prev = p;
 		_next = p->_next;
@@ -47,6 +73,8 @@
 		_prev->_next = this;
 	}
 
+  /// alone - Set the object as being part of a new empty list.
+  ///
 	inline void alone() { _prev = _next = this; }
 };
 
@@ -124,11 +152,18 @@
   static void internalThreadStart(mvm::Thread* th);
 
   /// internalClearException - Clear any pending exception.
+  ///
   virtual void internalClearException() {}
 
 public:
-  
+ 
+  /// ~Thread - Give the class a home.
+  ///
   virtual ~Thread() {}
+
+  /// tracer - Does nothing. Used for child classes which may defined
+  /// a tracer.
+  ///
   virtual void TRACER {}
 
 
@@ -138,15 +173,26 @@
     th->internalClearException();
   }
 
+  /// IDMask - Apply this mask to the stack pointer to get the Thread object.
+  ///
   static const uint64_t IDMask = 0x7FF00000;
 
+  /// operator new - Allocate the Thread object as well as the stack for this
+  /// Thread. The thread object is inlined in the stack.
+  ///
   void* operator new(size_t sz);
   
+  /// operator delete - Free the stack so that another thread can use it.
+  ///
   void operator delete(void* obj);
 
+  /// routine - The function to invoke when the thread starts.
+  ///
   void (*routine)(mvm::Thread*);
  
 #ifdef SERVICE
+  /// stoppingService - The service that is currently stopping.
+  ///
   VirtualMachine* stoppingService;  
 #endif
 





More information about the vmkit-commits mailing list