]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - 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
index b355c24133db54efb8302e4d7731b819ee09d1f8..1cb6af962ba7ef4deceef83b4e8e74fbd6b59647 100644 (file)
@@ -1,7 +1,35 @@
+/*\r
+* Implements simple producer/consumer thread pair to cause load on the CPU.\r
+* \r
+* Used in benchmarking the CAN gateway.\r
+*\r
+* Co-opted from http://support.dce.felk.cvut.cz/pos/cv3/src/semaphore.html. \r
+*/\r
 #ifndef __CPU_LOAD_H_\r
 #define __CPU_LOAD_H_\r
 \r
+\r
+/*\r
+* This function starts threads loading the CPU and creates associated semaphores. \r
+* \r
+* Has a guard to prevent starting again, before it was stopped.\r
+*\r
+* No error handling currently, only tries to report errors.\r
+*\r
+* 0 if successfull, 1 otherwise.\r
+*/\r
 int start_thread_load();\r
+\r
+/*\r
+* This function stops threads loading the CPU and destroys associated semaphores. \r
+*\r
+* Has a guard against attempting to stop the threads if they are not running.\r
+* \r
+* No error handling currently, only tries to report errors.\r
+*\r
+* 0 if successfull, 1 otherwise.\r
+*/\r
 int end_thread_load();\r
 \r
-#endif
\ No newline at end of file
+#endif\r
+\r