Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
more respect to others privacy
[simgrid.git] / src / bindings / ruby / simgrid_ruby.c
index c30de11..9e09a18 100644 (file)
@@ -65,7 +65,7 @@ static void msg_run(VALUE class) {
   DEBUG0
   ("MSG_main finished. Bail out before cleanup since there is a bug in this part.");
   /* Cleanup Ruby hosts */
-  DEBUG0("Clean Ruby World (TODO) ");
+  DEBUG0("Clean Ruby World  ");
   hosts = MSG_get_host_table();
   host_count = MSG_get_host_number();
   for (cpt=0;cpt<host_count;cpt++) {
@@ -132,12 +132,10 @@ static void msg_debug(VALUE class,VALUE msg) {
 
 // get Clock
 static VALUE msg_get_clock(VALUE class) {
-
   return rb_float_new(MSG_get_clock());
 
 }
 
-
 extern const char*xbt_ctx_factory_to_use; /*Hack: let msg load directly the right factory */
 
 typedef VALUE(*rb_meth)(ANYARGS);
@@ -180,13 +178,15 @@ void Init_simgrid_ruby() {
   rb_define_module_function(rb_task,"source",(rb_meth)rb_task_source,1);
   rb_define_module_function(rb_task,"listen",(rb_meth)rb_task_listen,2);
   rb_define_module_function(rb_task,"listenFromHost",(rb_meth)rb_task_listen_host,3);
+  rb_define_module_function(rb_task,"setPriority",(rb_meth)rb_task_set_priority,2);
+  rb_define_module_function(rb_task,"cancel",(rb_meth)rb_task_cancel,1);
 
   //Host Methods
   rb_define_module_function(rb_host,"getByName",(rb_meth)rb_host_get_by_name,1);
   rb_define_module_function(rb_host,"name",(rb_meth)rb_host_name,1);
   rb_define_module_function(rb_host,"speed",(rb_meth)rb_host_speed,1);
   rb_define_module_function(rb_host,"number",(rb_meth)rb_host_number,0);
-  rb_define_module_function(rb_host,"setData",(rb_meth)rb_host_set_data,2);
-  rb_define_module_function(rb_host,"getData",(rb_meth)rb_host_get_data,1);
   rb_define_module_function(rb_host,"isAvail",(rb_meth)rb_host_is_avail,1);
-}
\ No newline at end of file
+  rb_define_module_function(rb_host,"getHostProcess",(rb_meth)rb_host_process,1);
+  rb_define_module_function(rb_host,"all",(rb_meth)rb_host_get_all_hosts,0);
+}