Index: trunk/SophyaLib/SysTools/cxxcmplnk.cc
===================================================================
--- trunk/SophyaLib/SysTools/cxxcmplnk.cc	(revision 2202)
+++ trunk/SophyaLib/SysTools/cxxcmplnk.cc	(revision 2212)
@@ -36,4 +36,10 @@
 
 /* --Methode-- */
+/*!
+  Constructor
+  \param fglibsophya : if \c true libsophya.so is used when linking
+  \param fglibextsophya : if \c true libextsophya.so is used when linking
+  \param fglibpi : if \c true libPI.so is used when linking
+*/
 CxxCompilerLinker::CxxCompilerLinker(bool fglibsophya, bool fglibextsophya, bool fglibpi)
   : verbose(false)
@@ -136,4 +142,12 @@
 
 /* --Methode-- */
+/*!
+  Compiles the file \c name using the C++ compiler driver and produces 
+  the output object file \c oname. If no output name is specified,
+  a default output file name is made from the input name, with the 
+  suffix .o , the in temporary directory.
+  \param name : input C++ source file
+  \param oname : output object file 
+*/
 int CxxCompilerLinker::Compile(string const & name, string & oname)
 {
@@ -160,4 +174,12 @@
 
 /* --Methode-- */
+/*!
+  Creates a shared library from the object file \c oname.
+  If no output name \c soname is specified,
+  a default output file name is made from the object name, with the 
+  suffix .so , in the temporary directory.
+  \param oname : input object file 
+  \param soname : shared library name
+*/
 int CxxCompilerLinker::BuildSO(string const & oname, string & soname)
 {
Index: trunk/SophyaLib/SysTools/cxxcmplnk.h
===================================================================
--- trunk/SophyaLib/SysTools/cxxcmplnk.h	(revision 2202)
+++ trunk/SophyaLib/SysTools/cxxcmplnk.h	(revision 2212)
@@ -23,23 +23,32 @@
   virtual int           BuildSO(string const & oname, string & soname);
 
+  //! Adds compilation options \c opt . Appended to the present option string.
   inline void           AddCompileOptions(string const & opt)
   { compOptions += " " + opt; }
+  //! Sets the compilation options.
   inline void           SetCompileOptions(string const & opt = "")
   { compOptions = opt; }
+  //! Returns the currently defined compilation options.
   inline string         GetCompileOptions()
   { return compOptions; }
 
+  //! Adds link options \c opt . Appended to the present option string.
   inline void           AddLinkOptions(string const & opt)
   { linkOptions += " " + opt; }
+  //! Sets the link options.
   inline void           SetLinkOptions(string const & opt = "")
   { linkOptions = opt; }
   inline string         GetLinkOptions()
+  //! Returns the currently defined link options.
   { return linkOptions; }
 
+  //! Sets the temporary directory path.
   inline void        	SetTmpDir(string const & tmpdir)
   { tmpDir = tmpdir; }
+  //! returns the currently defined temporary directory path.
   inline string        	GetTmpDir()
   { return tmpDir; }
-
+  
+  //! Activate (or deactivate) the verbose mode.
   inline void           SetVerbose(bool fg=false)
   { verbose = fg; }
Index: trunk/SophyaLib/SysTools/resusage.cc
===================================================================
--- trunk/SophyaLib/SysTools/resusage.cc	(revision 2202)
+++ trunk/SophyaLib/SysTools/resusage.cc	(revision 2212)
@@ -16,6 +16,20 @@
   The information should be updated through the call to the 
   Update() method. 
+  Note: The information is obtained through \c getrusage()   
+  and \c getrlimit() system calls, and depending on the OS, 
+  not all of the memory usage values are correctly filled.
+  \code
+  // How to check resource usage for a given part of the program
+  ResourceUsage res;
+  // --- Part of the program to be checked : Start
+  // ...
+  res.Update();
+  cout << " Memory size increase (KB):" << res.getDeltaMemorySize() << endl;
+  cout << " Resource usage info : \n" << res << endl;
+  \endcode
 */
-
+/*!
+  Constructor. the \b Update() method is called.
+*/
 ResourceUsage::ResourceUsage()
 {
@@ -47,5 +61,7 @@
   
 }
-
+/*!
+   Destructor.
+*/
 ResourceUsage::~ResourceUsage()
 {
@@ -58,4 +74,7 @@
 }
 
+/*!
+  Update the CPU and memory usage information.
+*/
 int ResourceUsage::Update()
 {
@@ -82,4 +101,10 @@
 }
 
+/*!
+   Prints the CPU and memory usage information.
+   \param os : The output stream
+   \param lp : The print level (0 .. 2)
+   \param upd : if \c true , the Update method is called.
+*/
 void ResourceUsage::Print(ostream& os, int lp, bool upd) 
 {
Index: trunk/SophyaLib/SysTools/resusage.h
===================================================================
--- trunk/SophyaLib/SysTools/resusage.h	(revision 2202)
+++ trunk/SophyaLib/SysTools/resusage.h	(revision 2212)
@@ -24,36 +24,55 @@
   // Memory usage in kilo-bytes  
   // NOTE: getDataSize() getStackSize() retournent des valeurs bizarres
+  //! Returns the current memory (Resident) size (in kilo-bytes) 
   inline uint_8 getMemorySize() { return cur_rss; }
+  //! Returns the maximum allowed memory size: Min( \c MaxResidentSize , \c MaxDataSize ))
   inline uint_8 getMaxMemorySize() 
     { return((getMaxResidentSize()<getMaxDataSize()) ? 
 	     getMaxResidentSize() :getMaxDataSize() ); }
+  //! Returns the increase in memory usage since the previous call to \b Update()
   inline uint_8 getDeltaMemorySize() { return delta_rss; }
 
+  //! Returns the maximum allowd data segment size (in kilo-bytes)
   inline uint_8 getMaxDataSize() { return((max_datasz>0)?max_datasz:1024); }
+  //! Returns the current data segment size (in kilo-bytes)
   inline uint_8 getDataSize() { return cur_datasz; }  
+  //! Returns the maximum allowed resident size (in kilo-bytes)
   inline uint_8 getMaxResidentSize() { return((max_rss>0)?max_rss:1024); }
+  //! Returns the current resident memory size (in kilo-bytes)
   inline uint_8 getResidentSize() { return cur_rss; }
+  //! Returns the maximum allowed stack size (in kilo-bytes)
   inline uint_8 getMaxStackSize() { return max_stack; }
+  //! Returns the current stack size (in kilo-bytes)
   inline uint_8 getStackSize() { return cur_stack; }
 
   
   // Time in milli-second
+  //! Returns the total CPU time used (in milli-second)
   inline uint_8 getCPUTime() { return cur_tottm; }
+  //! Returns the total elapsed time (in milli-second)
   inline uint_8 getElapsedTime() { return elapsed_time; }
+  //! Returns the average load ( CPU time / elapsed time)
   inline double  getAverageCPULoad() 
     { return ((elapsed_time>1) ? (double)cur_tottm/(double)elapsed_time: 1.);}
 
+  //! Returns the CPU time used since the previous call to \b Update() (in milli-second)
   inline uint_8 getDeltaCPUTime() { return delta_tottm; }
+  //! Returns the elapsed time since the previous call to \b Update() (in milli-second)
   inline uint_8 getDeltaElapsedTime() { return delta_elapsed_time; }
+  //! Returns the CPU load since the previous call to \b Update()
   inline double  getCPULoad() 
     { return ((delta_elapsed_time>1) ? (double)delta_tottm/(double)delta_elapsed_time: 1.);}
 
 
+  //! Returns the total CPU time (in milli-second)
   inline uint_8 getTotalCPUTime() { return cur_tottm; }
+  //! Returns the CPU time in user mode (in milli-second)
   inline uint_8 getUserCPUTime() { return cur_usrtm; }
+  //! Returns the CPU time in system mode (in milli-second)
   inline uint_8 getSysCPUTime() { return cur_systm; }
 
 
   void  Print(ostream& os, int lp=0, bool upd=true);
+  //! Alias for the \b Print() method. 
   inline void print(ostream& os, int lp=0, bool upd=true){ Print(os,lp,upd); }
 
@@ -81,4 +100,5 @@
 };
 
+//! Prints the resource usage information on the output stream 
 inline ostream& operator << (ostream& os, ResourceUsage& ru)
 { ru.Print(os,0,true); return(os); }
Index: trunk/SophyaLib/SysTools/timing.c
===================================================================
--- trunk/SophyaLib/SysTools/timing.c	(revision 2202)
+++ trunk/SophyaLib/SysTools/timing.c	(revision 2212)
@@ -37,4 +37,10 @@
  
 /* Nouvelle-Fonction */
+/*!
+   \ingroup SysTools
+   Initializes CPU and elapsed time timer (C function).
+   The values of the CPU and elapsed time can then be printed 
+   using \b PrtTim() 
+*/
 void InitTim(void)
 {
@@ -45,5 +51,9 @@
  
 /* Nouvelle-Fonction */
-void PrtTim(char *Comm)
+/*!
+   \ingroup SysTools
+   Prints the values of the CPU and elapsed time, since call to \b InitTim().
+*/
+void PrtTim(const char * Comm)
 {
 float tcal,tcalt;
Index: trunk/SophyaLib/SysTools/timing.h
===================================================================
--- trunk/SophyaLib/SysTools/timing.h	(revision 2202)
+++ trunk/SophyaLib/SysTools/timing.h	(revision 2212)
@@ -10,5 +10,5 @@
 
 void InitTim(void);                                                             
-void PrtTim(char *Comm);                                                        
+void PrtTim(const char * Comm);                                                        
                                                                                 
 #ifdef __cplusplus
Index: trunk/SophyaLib/SysTools/zthread.cc
===================================================================
--- trunk/SophyaLib/SysTools/zthread.cc	(revision 2202)
+++ trunk/SophyaLib/SysTools/zthread.cc	(revision 2212)
@@ -5,4 +5,35 @@
 #include <stdlib.h>
 #include <stdio.h>
+
+/*!
+  \class SOPHYA::ZThread
+  \ingroup SysTools
+  This class provides an interface for creating and controlling threads.
+  The implementation uses the POSIX thread interface.
+  The ZThread objects can be sub classed with the redefinition of 
+  the \c run() method which then performs the task.
+  The default \c run() method of the base class can be used directly
+  to perform computation through a function (see \b setAction() method)
+  \sa SOPHYA::ZMutex
+  The following sample code shows the usage of ZThread object 
+  to run simultaneously to functions to perform computation.
+
+  \code
+  // The functions to perform computing
+  void fun1(void *arg) { }
+  void fun2(void *arg) { }
+  // ...
+  ZThread zt1;
+  zt1.setAction(fun1, arg[1]);
+  ZThread zt2;
+  zt2.setAction(fun2, arg[1]);
+  cout << " Starting threads ... " << endl;
+  zt1.start();
+  zt2.start();
+  cout << " Waiting for threads to end ... " << endl;  
+  zt1.join();
+  zt2.join();
+  \endcode
+*/
 
 #define CheckSt(st_, strg_)  if (st_ != 0)  perror(strg_); 
@@ -24,5 +55,7 @@
 
 /* ------ Classe ZThread  -------  */
-
+/*!
+  Constructor, with optional specification of the thread stack size.
+*/
 ZThread::ZThread(size_t stacksize)
 {
@@ -39,4 +72,7 @@
 }
 
+/*!
+  Method which starts the thread.
+*/
 void ZThread::start()
 {
@@ -54,5 +90,7 @@
 }
 
-
+/*!
+  Calls the pthread_cancel. Can be used to stop a running thread.
+*/
 void ZThread::cancel()
 {
@@ -64,4 +102,7 @@
 
 
+/*!
+  Waits for the thread to terminate. 
+*/
 void ZThread::join()
 {
@@ -73,4 +114,8 @@
 }
 
+/*!
+  This virtual method can be redefined in the derived class, in order 
+  to perform the actual computation.
+*/
 void ZThread::run()
 {
@@ -82,5 +127,18 @@
 
 /* ------ Classe ZMutex -------  */
+/*!
+  \class SOPHYA::ZMutex
+  \ingroup SysTools
+  This class implements an interface to the Mutual Exclusion objects
+  of the POSIX threads. 
+  The ZMutex objects should be used to control acces from different threads 
+  to common objects through the \b lock() and \b unlock() methods.  
+  \sa SOPHYA::ZSync
+*/
 
+/*!
+  Constructor: Creates a associated pair of POSIX \c pthread_mutex_t 
+  and \c pthread_cond_t objects
+*/
 ZMutex::ZMutex()
 {
@@ -100,2 +158,14 @@
 }
 
+/*!
+  \class SOPHYA::ZSync
+  \ingroup SysTools
+  This class can be used to insure that the execution of a given 
+  part of the code is synchronised, i.e. only a single thread 
+  goes through this at a given time.
+  The constructor acquires a lock on given \b ZMutex object,
+  which is released by the destructor.
+  The ZSync object should then be instanciated at the beginning of 
+  the synchronised instruction bloc.
+  \sa SOPHYA::ZMutex
+*/
Index: trunk/SophyaLib/SysTools/zthread.h
===================================================================
--- trunk/SophyaLib/SysTools/zthread.h	(revision 2202)
+++ trunk/SophyaLib/SysTools/zthread.h	(revision 2212)
@@ -14,5 +14,11 @@
 
 typedef void (* ZThreadAction) (void *);
-  
+
+/*!
+  \class SOPHYA::ZThreadExc
+  \ingroup SysTools
+  This exception class is used by the classes implementing the interface 
+  to the POSIX threads (\b ZThread ...)
+*/  
 class ZThreadExc : public PException {
 public:
@@ -31,5 +37,7 @@
   virtual void  run();
 
+  //! Sets the return code for the thread object
   inline void   setRC(int rc) { _rc = rc; }
+  //! Return the value of the return code for the thread object
   inline int    getRC(int rc) { return(_rc);
  }
@@ -61,12 +69,17 @@
   explicit	ZMutex();
   virtual	~ZMutex();
+  //! Locks the mutex object
   inline void	lock()
     { pthread_mutex_lock(_mutx); } 
+  //! Unlocks the mutex object
   inline void	unlock()
-    { pthread_mutex_unlock(_mutx); } 
+    { pthread_mutex_unlock(_mutx); }
+  //! Waits for a condition change
   inline void	wait()
     { pthread_cond_wait(_condv, _mutx); }
+  //! Signal a condition change on the mutex object
   inline void	signal()
   { pthread_cond_signal(_condv); }
+  //! Broadcasts a condition change on the mutex object
   inline void	broadcast()
   { pthread_cond_broadcast(_condv); }
@@ -81,5 +94,5 @@
 public:
   explicit inline  ZSync(ZMutex & mtx) {_mtx = &mtx; mtx.lock(); }
-  inline	   ~ZSync() { _mtx->unlock(); }
+  inline	   ~ZSync() { if (_mtx) _mtx->unlock(); }
 
 private:
