]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - rtems/gw/libs/load.h
Cosmetic changes to load.c, load.h. Adds and cleans up comments.
[can-benchmark.git] / rtems / gw / libs / load.h
1 /*\r
2 * Implements simple producer/consumer thread pair to cause load on the CPU.\r
3\r
4 * Used in benchmarking the CAN gateway.\r
5 *\r
6 * Co-opted from http://support.dce.felk.cvut.cz/pos/cv3/src/semaphore.html. \r
7 */\r
8 #ifndef __CPU_LOAD_H_\r
9 #define __CPU_LOAD_H_\r
10 \r
11 \r
12 /*\r
13 * This function starts threads loading the CPU and creates associated semaphores. \r
14\r
15 * Has a guard to prevent starting again, before it was stopped.\r
16 *\r
17 * No error handling currently, only tries to report errors.\r
18 *\r
19 * 0 if successfull, 1 otherwise.\r
20 */\r
21 int start_thread_load();\r
22 \r
23 /*\r
24 * This function stops threads loading the CPU and destroys associated semaphores. \r
25 *\r
26 * Has a guard against attempting to stop the threads if they are not running.\r
27\r
28 * No error handling currently, only tries to report errors.\r
29 *\r
30 * 0 if successfull, 1 otherwise.\r
31 */\r
32 int end_thread_load();\r
33 \r
34 #endif\r
35 \r