Index: sources/src/gen_code.cc
===================================================================
--- sources/src/gen_code.cc	(revision 37)
+++ sources/src/gen_code.cc	(revision 38)
@@ -74,5 +74,22 @@
 typedef void (*CASC_ENTRY_FUNC) (void *);
 typedef union { unsigned long long int integer; SC_ENTRY_FUNC pmf; CASC_ENTRY_FUNC pf; } fct;
-  
+
+const char *
+get_pmf_type ()
+{
+  switch (sizeof (SC_ENTRY_FUNC)) {
+  case 4:
+    // G4 pointer-to-member-function style
+    return "unsigned long int";
+  case 8:
+    // PC pointer-to-member-function style
+    return "unsigned long long int";
+  default:
+    cerr << "Internal Error : Unsupported pointer-to-member-function"
+            "(size: " << sizeof (SC_ENTRY_FUNC) << ").\n"
+            "Please try --nodynamiclink option.\n";
+    exit(21072009);
+  };
+}
 
 static
@@ -278,9 +295,7 @@
     << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n"
     << " typedef void (*CASC_ENTRY_FUNC)(void *);\n";
-  const char *pmf_type = (sizeof (SC_ENTRY_FUNC) == 4)?
-                         // G4 pointer-to-member-function style
-                         "unsigned long int": 
-                         // PC pointer-to-member-function style
-                         "unsigned long long int";
+
+  const char *pmf_type = get_pmf_type ();
+
   o << " typedef union { " 
     << pmf_type 
@@ -375,7 +390,7 @@
 {
   if (dump_stage) 
-    cerr << "Compiling C code for scheduling...\n";
+    cerr << "Compiling C/C++ code for scheduling...\n";
   char compil_str[512];
-  const char *compiler = getenv ("GCC");
+  const char *compiler = getenv ("CXX");
   const char *systemc_dir = getenv ("SYSTEMCASS");
 //  const char *target_arch = getenv ("TARGET_ARCH");
@@ -431,9 +446,14 @@
 #endif
 	  ;
+
+  string cflags = casc_cflags;
+  if (use_openmp)
+    cflags += " -fopenmp";
+
   sprintf(compil_str, 
 		  commandline_template,
 		  temporary_dir,
 		  compiler, 
-		  casc_cflags, 
+		  cflags.c_str(), 
 		  systemc_dir, 
 		  target_name,
Index: sources/src/internal.h
===================================================================
--- sources/src/internal.h	(revision 37)
+++ sources/src/internal.h	(revision 38)
@@ -58,4 +58,5 @@
 extern int         scheduling_method;
 extern bool        use_port_dependency;
+extern bool        use_openmp;
 
 #define NO_SCHEDULING          0
Index: sources/src/sc_main.cc
===================================================================
--- sources/src/sc_main.cc	(revision 37)
+++ sources/src/sc_main.cc	(revision 38)
@@ -87,4 +87,86 @@
 bool        use_port_dependency     = false;
 
+#ifdef _OPENMP
+bool        use_openmp              = true;
+#else
+bool        use_openmp              = false;
+#endif
+
+const char *HELP_STRING = \
+"\n"
+"--a\n"
+"       almost static scheduling (use sensitivity list instead of port\n"
+"       dependency information\n"
+"\n"
+"--c\n"
+"       print schedule at simulation time (stderr)\n"
+"\n"
+"--d\n"
+"       check port dependencies (stderr)\n"
+"\n"
+"--edit\n"
+"       edit schedule before simulation (run $EDITOR or vim by default)\n"
+"\n"
+"--f\n"
+"       print function list (stderr)\n"
+"\n"
+"--h\n"
+"       display help screen and exit (stdout)\n"
+"\n"
+"--i\n"
+"       print instances list, signals list and statistics if available (stderr)\n"
+"\n"
+"--k\n"   
+"       dump generated scheduling code\n"
+"       (generated_by_systemcass/scheduling-xx.cc)\n"
+"\n"
+"--m\n"
+"       Mouchard's static scheduling (use port dependency information instead\n"
+"       of sensitivity list)\n"
+"\n"
+"--modules <filename>\n"
+"       dump module hierarchy graph into specified dot file (tons of bugs\n"
+"       inside)\n"
+"\n"
+"--nobanner\n"
+"       do not print SystemCASS splash screen\n"
+"\n"
+"--dynamiclink\n"
+"       dynamically link the scheduling code\n"
+"\n"
+"--nosim\n"
+"       run until elaboration stage. Don't simulate\n"
+"\n"
+"--notrace\n"
+"       disable all tracing functions\n"
+"\n"
+"--p\n"
+"       entirely static scheduling (use port dependency information instead of\n"
+"       sensitivity list)\n"
+"\n"
+"--s\n"
+"       print stage (stderr)\n"
+"\n"
+"--save_on_exit <name>\n"
+"       save simulation state saved into <name> file when SystemCASS exits\n"
+"       (SOCVIEW format)\n"
+"\n"
+            /* WARNING : we can't avoid destructors execution before saving */
+"--t\n"
+"       dump either module graph, or signal dependency graph, signal order,\n"
+"       and module evalutation order into dot files\n"
+"\n"
+"--tracestart <n>\n"
+"       start tracing functions at #n cycle\n"
+"\n"
+"--usage\n"
+"       print user time elapsed (sec), simulation cycles done (cycles),\n"
+"       and simulator performance (cycles/second) (stderr)\n"
+"\n"
+"--v\n"
+"       print internal SystemCASS kernel options (stderr)\n"
+"\n";
+
+
 static
 void 
@@ -93,5 +175,5 @@
   // Display once
   if (nobanner == false)
-  	cerr << get_splash_screen ();
+    cerr << get_splash_screen ();
   nobanner = true;
 }
@@ -173,29 +255,8 @@
             print_splash_screen ();
             cerr << "Usage : " 
-                 << argv[0] << " [--c] [--edit] [--d] [--f] [--h] [--i] [--k] [--modules filename] [--nobanner] [--nodynamiclink] [--nosim] [--notrace] [--s] [--t] [--tracestart n] [--usage] [--v] [--p|m|a] [others parameters processed by sc_main]\n"
+                 << argv[0] << " [--c] [--edit] [--d] [--f] [--h] [--i] [--k] [--modules filename] [--nobanner] [--[no]dynamiclink] [--nosim] [--notrace] [--s] [--t] [--tracestart n] [--usage] [--v] [--p|m|a] [others parameters processed by sc_main]\n"
                  << "Thoses options are processed by SystemCASS library. All the remaining options are passed to sc_main.\n"
                  << "sc_main function retrieves last parameters.\n"
-                 << "a       : almost static scheduling (use sensitivity list instead of port dependency information)\n"
-                 << "c       : print schedule at simulation time (stderr)\n"
-                 << "d       : check port dependencies (stderr)\n"
-                 << "edit    : edit schedule before simulation (run $EDITOR or vim by default)\n"
-                 << "f       : print function list (stderr)\n"
-                 << "h       : display help screen and exit (stdout)\n"
-                 << "i       : print instances list, signals list and statistics if available (stderr)\n"
-                 << "k       : dump generated scheduling code (generated_by_systemcass/scheduling-xx.cc)\n"
-                 << "m       : Mouchard's static scheduling (use port dependency information instead of sensitivity list)\n"
-                 << "modules filename : dump module hierarchy graph into specified dot file (tons of bugs inside)\n"
-                 << "nobanner: do not print SystemCASS splash screen\n"
-                 << "dynamiclink: dynamically link the scheduling code\n"
-                 << "nosim   : run until elaboration stage. Don't simulate\n"
-                 << "notrace : disable all tracing functions\n"
-                 << "p       : entirely static scheduling (use port dependency information instead of sensitivity list)\n"
-                 << "s       : print stage (stderr)\n"
-                 << "save_on_exit <name> : save simulation state saved into <name> file when SystemCASS exits (SOCVIEW format)\n"
-            /* WARNING : we can't avoid destructors execution before saving */
-                 << "t       : dump either module graph, or signal dependency graph, signal order, and module evalutation order into dot files\n"
-                 << "tracestart n : start tracing functions at #n cycle\n"
-                 << "usage   : print user time elapsed (sec), simulation cycles done (cycles), and simulator performance (cycles/second) (stderr)\n"
-                 << "v       : print internal SystemCASS kernel options (stderr)\n";
+                 << HELP_STRING;
             noinitialization = true;
             nosimulation = true;
@@ -227,8 +288,8 @@
             print_schedule = true;
             continue;
-	  case 'd' :
+          case 'd' :
             if (strcmp (argv[i]+2, "dynamiclink") == 0)
               dynamic_link_of_scheduling_code = true;
-	    else
+            else
               check_port_dependencies = true;
             continue;
@@ -321,11 +382,14 @@
   print_splash_screen ();
   check_parameters ();
+
   if (noinitialization)
   {
     return 255;
   }
+
   int ret = sc_main(argc, argv);
-	free (pending_write_vector);
+  free (pending_write_vector);
   close_systemcass ();
+
   if (have_to_stop)
   {
@@ -333,4 +397,5 @@
     return 1;
   }
+
   return ret;
 }
Index: sources/src/sc_ver.cc
===================================================================
--- sources/src/sc_ver.cc	(revision 37)
+++ sources/src/sc_ver.cc	(revision 38)
@@ -74,5 +74,5 @@
 	"            E-mail support:  Richard.Buchmann@asim.lip6.fr\n"
 	"            Contributors : Richard Buchmann, Sami Taktak,\n"
-  "                           Paul-Jerome Kingbo, Frédéric Pétrot,\n"
+  "                           Paul-Jerome Kingbo, Frederic Pétrot,\n"
   "                           Nicolas Pouillon\n"
 	"\n"
Index: sources/src/schedulers.cc
===================================================================
--- sources/src/schedulers.cc	(revision 37)
+++ sources/src/schedulers.cc	(revision 38)
@@ -201,14 +201,14 @@
   }
 
-	SignalDependencyGraph* sig_graph = MakeSignalDependencyGraph ();
+  SignalDependencyGraph* sig_graph = MakeSignalDependencyGraph ();
 
   if (dump_all_graph)
     SignalDependencyGraph2dot ("signal_graph",*sig_graph);
 
-	if (!Check (*sig_graph))
-	{
-		cerr << "The signal dependency graph is not valid.\n";
+  if (!Check (*sig_graph))
+  {
+    cerr << "The signal dependency graph is not valid.\n";
     exit (29092004);
-	}
+  }
 
 #if 1
@@ -219,20 +219,20 @@
   }
 #endif
-	
-	// There is a cycle in the signal dependency graph ?
+  
+  // There is a cycle in the signal dependency graph ?
   Graph *sig_knuth = makegraph (*sig_graph);
-	strong_component_list_t *s = strong_component(sig_knuth);
+  strong_component_list_t *s = strong_component(sig_knuth);
 
   if (dump_all_graph)
     SignalDependencyOrder2txt ("signal_order",*s);
 
-	if (has_cycle (*s))
-	{
-		cerr << "Error : There is a cycle in the signal dependency graph.\n";
+  if (has_cycle (*s))
+  {
+    cerr << "Error : There is a cycle in the signal dependency graph.\n";
 #if 0
     print_cycle (cerr, get_cycle (*s));
 #endif
     exit (24092004);
-	}
+  }
   return sig_graph;
 }
@@ -249,7 +249,7 @@
 
   if (dump_all_graph)
-  	ProcessDependencyList2dot  ("process_order",*process_list);
-
-	return process_list;
+    ProcessDependencyList2dot  ("process_order",*process_list);
+
+  return process_list;
 }
 
@@ -260,10 +260,10 @@
   SignalDependencyGraph *sig_graph = MakeAcyclicSignalDependencyGraph ();
   // Create the process evaluation list
-	ProcessDependencyList* process_list = MakeProcessDependencyList (*sig_graph);
+  ProcessDependencyList* process_list = MakeProcessDependencyList (*sig_graph);
 
   if (dump_all_graph)
-  	ProcessDependencyList2dot  ("process_order",*process_list);
-
-	return process_list;
+    ProcessDependencyList2dot  ("process_order",*process_list);
+
+  return process_list;
 }
 
@@ -290,8 +290,8 @@
     // Uses port dependancies like Dr. Mouchard.
     ProcessDependencyList* process_list = BuchmannScheduling ();
-	if (dynamic_link_of_scheduling_code)
-		base_name = gen_scheduling_code_for_dynamic_link (transition_func_list, moore_func_list,*process_list);
-	else
-		gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list);
+  if (dynamic_link_of_scheduling_code)
+    base_name = gen_scheduling_code_for_dynamic_link (transition_func_list, moore_func_list,*process_list);
+  else
+    gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list);
     break;
   }
@@ -303,8 +303,8 @@
     // and does not use an event-driven scheduler.
     ProcessDependencyList* process_list = MouchardScheduling ();
-	if (dynamic_link_of_scheduling_code)
-		base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*process_list);
-	else
-		gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list);
+  if (dynamic_link_of_scheduling_code)
+    base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*process_list);
+  else
+    gen_scheduling_code_for_static_func (transition_func_list, moore_func_list, *process_list);
     break;
   }
@@ -317,8 +317,8 @@
       graph2dot("module_graph", *g);
     strong_component_list_t *strong_list = strong_component (g);
-	if (dynamic_link_of_scheduling_code)
-		base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*strong_list);
-	else
-		gen_scheduling_code_for_quasistatic_func (transition_func_list, moore_func_list, *strong_list);
+  if (dynamic_link_of_scheduling_code)
+    base_name = gen_scheduling_code_for_dynamic_link(transition_func_list, moore_func_list,*strong_list);
+  else
+    gen_scheduling_code_for_quasistatic_func (transition_func_list, moore_func_list, *strong_list);
     break;
   }
