Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
require 'simgrid_ruby'
authorcoldpeace <coldpeace@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 9 Apr 2010 08:49:03 +0000 (08:49 +0000)
committercoldpeace <coldpeace@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 9 Apr 2010 08:49:03 +0000 (08:49 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7496 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/bindings/ruby/simgrid.rb

index f22a3fb..09bb9ce 100644 (file)
@@ -5,11 +5,11 @@
 # This program is free software; you can redistribute it and/or modify it
 #  under the terms of the license (GNU LGPL) which comes with this package. */
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
-require 'simgrid'
+require 'simgrid_ruby'
 require 'thread'
 
 #######################################
-#  Semaphore
+#  Semaphore 
 #######################################
 
 class Semaphore
@@ -82,7 +82,7 @@ class MSG::Process < Thread
   end
      
   def start()
-     @schedBegin.acquire
+    @schedBegin.acquire
     MSG::debug("Let's execute the main() of the Ruby process")
     main(@pargs)
     @schedEnd.release
@@ -125,18 +125,17 @@ class MSG::Process < Thread
     processGetHost(self)
   end
 
-# The Rest of Methods !!! To be Continued ... FIXME: what's missing?
 end
 ############################################
 # Task Extend from the native Class RbTask
 ############################################
 class MSG::Task < MSG::RbTask
-
+  
   def initialize(*args)
-   super() #no effect
+    #Nothing todo   
   end
   
-  def setData(value)
+  def join(value) 
     super(self,value)
   end
   
@@ -145,15 +144,19 @@ class MSG::Task < MSG::RbTask
   end
   
   def name
-      super(self)
+   super(self)
   end
   
   def compSize
-     super(self)
+    super(self)
   end
   
   def send(mailbox)
-    super(self,mailbox)
+   super(self,mailbox)
+  end
+  
+  def receive(mailbox)
+    super(self)
   end
   
   def source
@@ -165,7 +168,7 @@ class MSG::Task < MSG::RbTask
   end
   
   def listen(t_alias)
-    super(t_alias)
+    super(self)
   end
   
   def execute
@@ -173,22 +176,23 @@ class MSG::Task < MSG::RbTask
   end
     
   def listenFromHost(t_alias,host)
-    super(t_alias,host)
+    super(self)
   end
   
   def setPriority(priority)
     super(self,priority)
   end
   
-  def cancel()
+  def cancel
     super(self)
   end
   
-  def hasData()
+  def hasData
     super(self)
   end
    
 end  
+
 ####################################################
 # Host Extend from the native Class RbHost
 ####################################################
@@ -224,7 +228,6 @@ class MSG::Host < MSG::RbHost
     super(self)
   end
   
-  
   def isAvail
     super(self)
   end