X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fe1f35a08a06923fe38c33f3299ac89e56f50998..ece368b732f850ec952dfe633ff698d07ef535d7:/src/bindings/ruby/simgrid.rb diff --git a/src/bindings/ruby/simgrid.rb b/src/bindings/ruby/simgrid.rb index 1fcab4facc..09bb9ce74e 100644 --- a/src/bindings/ruby/simgrid.rb +++ b/src/bindings/ruby/simgrid.rb @@ -9,7 +9,7 @@ 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() + #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,18 +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 + super(self) + end + end + #################################################### # Host Extend from the native Class RbHost #################################################### @@ -220,7 +228,6 @@ class MSG::Host < MSG::RbHost super(self) end - def isAvail super(self) end @@ -237,4 +244,4 @@ end ######################### # Main chunck ######################### -MSG.init(ARGV) \ No newline at end of file +MSG.init(ARGV)