Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[simix] Update the documentation of simcalls.in
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 26 May 2016 09:11:01 +0000 (11:11 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 26 May 2016 09:11:39 +0000 (11:11 +0200)
src/simix/simcalls.in

index 53c0ef3..545030c 100644 (file)
@@ -3,31 +3,21 @@
 # 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.
 
-# CallType handler? name (resulttype,resultcast) (arg0name,arg0type,arg0cast) (arg1name,arg1type,arg1cast)
-
-# CallType must be one of the three:
-#
-#  - Func: returning a value immediately (within the same scheduling round)
-#    examples: all getters that only retrieve information with no side effect
+# The simcalls are given as C-like signatures (one per line):
 #
-#  - Proc: not returning any value (but doing so immediately) 
-#    examples: all setters, *_cancel 
+# int foo(int x, int y);
+# int foo(int x, int y) [[block]];
+# int foo(int x, int y) [[nohandler]];
+# int foo(int x, int y) [[block, nohandler]];
 #
-#  - Blck: Blocking call that does not return in the same scheduling round.
-#    The answer requires some interaction with SURF, even if this can
-#    still occure at the same timestamp under some circonstances (eg
-#    if the surf_action cannot start because of resources that are down)
-#    examples: things that last some time (communicate, execute, mutex_lock)
+# The `block` attribut is used for calls which do not return in the same
+# scheduling round. The answer requires some interaction with SURF,
+# even if this can still occure at the same timestamp under some
+# circonstances (eg if the surf_action cannot start because of resources
+# that are down) examples: things that last some time (communicate, execute,
+# mutex_lock).
 #
-#    In a perfect world, these answers would also be handled by the
-#    script, but we are not there yet. Instead, the answer is manually
-#    generated in one of the SIMIX_post_*() functions, that are called
-#    when we unpack the done and failed actions returned by surf after
-#    a surf simulation round. Weird things happen if you forget to
-#    answer a given simcall in there...
-
-# Handler? is either "H" if we need to generate a handler or "-" if we should go without handlers
-
+# The `nohandler` is used to disable handlers.
 # I wish we could completely remove the handlers as their only use is
 # to adapt the interface between the exported symbol that is visible
 # by the user applications and the internal symbol that is implemented