HEADS-project / training

Training material to get started with the HEADS technologies
10 stars 16 forks source link

Contribution from Steffen Dalgard #3

Closed sdalgard closed 9 years ago

sdalgard commented 9 years ago

The program reuses timer, extends customprinter and add three new process types sender, printIncrementForward and ender

The sender process sends a token each time timer expires The token is an integer number that is sendt through a chain of 6 printIncrementForward processes The process prints the number, increments it and forward it to the next The ender loops back the token through the same chain. This time the number is decremented

Expected output for each time the timer expires is: Sender sends token ... 1 2 3 4 5 6 ... Ender returns token ... 6 5 4 3 2 1 Sender got token back