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