From ecad07ec03d6908c3c2ba50bde0b2c6c78301002 Mon Sep 17 00:00:00 2001 From: halw Date: Mon, 7 Mar 2011 19:13:42 +0000 Subject: [PATCH] Author:halw Date:2011-03-07T19:13:42.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@837 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../scoop-examples/baboon-crossing.wiki | 6 ++++-- .../other-languages/cecil/cecil-reference/eif-function.wiki | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/baboon-crossing.wiki b/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/baboon-crossing.wiki index 4b6e3f1e..b705dc32 100644 --- a/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/baboon-crossing.wiki +++ b/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/baboon-crossing.wiki @@ -32,7 +32,7 @@ The rope is modeled in this example by class ROPE, and is the prima There are two more interesting features of ROPE, directions and announce which will be discussed below. -The baboons (modeled by class BABOON), when they are created are determined at random to want to go either left or right. As each baboon is created by the root class of the example, it is launched into life. For the purposes of this example, the baboon life is short and consists of four steps: +The baboons (modeled by class BABOON), as they are created, are determined at random to want to go either left or right. As each baboon is created by the root class of the example, it is launched into life. For the purposes of this example, the baboon life is short and consists of four steps: : 1) Announcing one's desired direction to the rope. Doing this involves the feature {ROPE}.announce that was mentioned above. The rope keeps a queue of these desired directions as announced by the baboons in its directions feature. It is by keeping this queue that the rope can make its decisions to change the direction of the flow of baboons. @@ -42,7 +42,9 @@ The baboons (modeled by class BABOON), when they are created are de : 4) Dismounting the rope. After crossing the canyon, the baboon gets off the rope ... and dies immediately after attaining what was apparently its only goal in life. - +Although it was mentioned above, it bears repeating that the rope is not just a shared resource, but an active and important player in this example. Indeed, it is the rope that controls the direction of the flow of baboons across the canyon, and ensures fairness. + +When a baboon announces himself as a candidate for crossing the canyon in a particular direction, the rope queues this information. When the rope allows a baboon to mount and cross, the desired direction of the next baboon in the directions queue is queried. If the next baboon wants to go in a different direction, then the state of the rope is set to "changing", and no more baboons are allowed on the rope until the current stream finishes crossing. When the last baboon if that stream dismounts the rope, the direction of flow is changed and the "changing" state is repealed, allowing baboons wanting to cross in the opposite direction to have a go. diff --git a/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-function.wiki b/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-function.wiki index 9130e675..c4d68fe0 100644 --- a/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-function.wiki +++ b/documentation/current/solutions/other-languages/cecil/cecil-reference/eif-function.wiki @@ -1,10 +1,14 @@ [[Property:title|eif_*_function]] [[Property:weight|15]] -[[Property:uuid|b3e29e7a-2ab6-c98e-483a-33139b279edc]] +[[Property:uuid|643603a5-de12-1ffc-2da3-92c8475078e8]] ==Overview== This page documents all CECIL functions of the form eif_*_function where "*" is a supported type such as "integer", "bit", "character", "real", etc. + +{{note|All pages titled with those same patterns, (e. g., [[eif_reference_function]], [[eif_integer_function]]) will '''redirect''' to this page. }} + + ==Synopsis== #include "eif_cecil.h"