X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/23c076db121b7e1fd3710db48d3f1e177cbf9fd3..763a261066247a3639a8162d1e4d5a015f9654a5:/src/bindings/ruby_bindings.h diff --git a/src/bindings/ruby_bindings.h b/src/bindings/ruby_bindings.h index a1ff9257aa..1dd82cf1d1 100644 --- a/src/bindings/ruby_bindings.h +++ b/src/bindings/ruby_bindings.h @@ -17,6 +17,7 @@ */ #include "msg/msg.h" +#include "msg/private.h" #include "msg/datatypes.h" #include "surf/surfxml_parse.h" @@ -26,6 +27,8 @@ #include "xbt/log.h" #include "xbt/asserts.h" +#include "simix/smx_context_private.h" + /* Damn Ruby. They load their full config.h, which breaks since we also load ours. * So, we undef the offending defines */ @@ -37,13 +40,11 @@ #undef _GNU_SOURCE #include - - /* ********************* * * Context related stuff * * ********************* */ typedef struct s_smx_ctx_ruby { - SMX_CTX_BASE_T; + s_smx_ctx_base_t super; /* Fields of super implementation */ VALUE process; // The Ruby Process Instance //... }s_smx_ctx_ruby_t,*smx_ctx_ruby_t; @@ -68,7 +69,6 @@ void rb_process_join( VALUE ruby_process ); void rb_process_unschedule( VALUE ruby_process ); void rb_process_schedule( VALUE ruby_process ); - /* ********************************************** * * Function for Native Process (Bound) Management * * * @@ -99,6 +99,8 @@ VALUE rb_host_speed(VALUE Class,VALUE host); void rb_host_set_data(VALUE Class,VALUE host,VALUE data); VALUE rb_host_get_data(VALUE Class,VALUE host); VALUE rb_host_is_avail(VALUE Class,VALUE host); +VALUE rb_host_process(VALUE Class,VALUE process); +VALUE rb_host_get_all_hosts(VALUE Class); /* Functions related to tasks */ void rb_task_free(m_task_t tk); @@ -114,6 +116,8 @@ VALUE rb_task_sender(VALUE Class,VALUE task); VALUE rb_task_source(VALUE Class,VALUE task); VALUE rb_task_listen(VALUE Class,VALUE task,VALUE alias); //Listen From Alias (=mailbox) VALUE rb_task_listen_host(VALUE Class,VALUE task,VALUE alias,VALUE host); //Listen from Host +void rb_task_set_priority(VALUE Class,VALUE task,VALUE priority); // Set Priority +void rb_task_cancel(VALUE Class,VALUE task); // Cancel /* Upcalls for the application handler */ void rb_application_handler_on_start_document(void);