2 * Implements simple producer/consumer thread pair to cause load on the CPU.
4 * Used in benchmarking the CAN gateway.
6 * Co-opted from http://support.dce.felk.cvut.cz/pos/cv3/src/semaphore.html.
13 * This function starts threads loading the CPU and creates associated semaphores.
15 * Has a guard to prevent starting again, before it was stopped.
17 * No error handling currently, only tries to report errors.
19 * 0 if successfull, 1 otherwise.
21 int start_thread_load();
24 * This function stops threads loading the CPU and destroys associated semaphores.
26 * Has a guard against attempting to stop the threads if they are not running.
28 * No error handling currently, only tries to report errors.
30 * 0 if successfull, 1 otherwise.
32 int end_thread_load();