Pass data between tasks

I have the Arduino Due I am planning to use the Scheduler library or one that allows me to. However, I dont quite understand how can I pass data safely between tasks. Lets say I have some process that runs at 2 Hz, when that finished I want to pass that data to the 1 Hz tasks.

Can anyone provide to me some guidance into this. There is not an example of this at http://playground.arduino.cc//Main/LibraryList#Sched nor http://playground.arduino.cc/Main/SketchList, http://arduino.cc/en/Reference/Scheduler

The easiest way to do this is to manage your tasks (each in its own function) using the the timing technique in the Blink Without Delay example sketch. I wrote an extended demo of the technique in the first post in this Thread.

Use global variables to hold values that must be shared between tasks.

…R

I am using set of flags to determine if data are changed or no. Set flag for data change, clear for data read.