diff mbox

doxygen clean up odp_common.[ch]

Message ID 1398420171-7187-1-git-send-email-maxim.uvarov@linaro.org
State Accepted
Headers show

Commit Message

Maxim Uvarov April 25, 2014, 10:02 a.m. UTC
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 test/api_test/odp_common.c | 12 +++++++++---
 test/api_test/odp_common.h | 11 ++++++++---
 2 files changed, 17 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/test/api_test/odp_common.c b/test/api_test/odp_common.c
index 5c7a487..b1b87bc 100644
--- a/test/api_test/odp_common.c
+++ b/test/api_test/odp_common.c
@@ -19,10 +19,13 @@ 
 
 
 /* Globals */
-static odp_linux_pthread_t thread_tbl[MAX_WORKERS];
-static int num_workers;
-__thread test_shared_data_t *test_shared_data;
+static odp_linux_pthread_t thread_tbl[MAX_WORKERS]; /**< worker threads table	*/
+static int num_workers;				    /**< number of workers 	*/
+__thread test_shared_data_t *test_shared_data;	    /**< pointer to shared data */
 
+/**
+ * Print system information
+ */
 void odp_print_system_info(void)
 {
 	odp_coremask_t coremask;
@@ -48,6 +51,7 @@  void odp_print_system_info(void)
 	printf("\n");
 }
 
+/** test init globals and call odp_init_global() */
 int odp_test_global_init(void)
 {
 	memset(thread_tbl, 0, sizeof(thread_tbl));
@@ -65,6 +69,7 @@  int odp_test_global_init(void)
 	return 0;
 }
 
+/** create test thread */
 int odp_test_thread_create(void *func_ptr(void *), pthrd_arg *arg)
 {
 	/* Create and init additional threads */
@@ -74,6 +79,7 @@  int odp_test_thread_create(void *func_ptr(void *), pthrd_arg *arg)
 	return 0;
 }
 
+/** exit from test thread */
 int odp_test_thread_exit(pthrd_arg *arg)
 {
 	/* Wait for other threads to exit */
diff --git a/test/api_test/odp_common.h b/test/api_test/odp_common.h
index f5183e1..f321b6b 100644
--- a/test/api_test/odp_common.h
+++ b/test/api_test/odp_common.h
@@ -13,8 +13,9 @@ 
 #ifndef ODP_COMMON_H
 #define ODP_COMMON_H
 
-#define MAX_WORKERS 32
+#define MAX_WORKERS 32 /**< Maximum number of work threads */
 
+/** types of tests */
 typedef enum {
 	ODP_ATOMIC_TEST = 0,
 	ODP_SHM_TEST,
@@ -24,13 +25,17 @@  typedef enum {
 	ODP_MAX_TEST
 } odp_test_case_e;
 
+/**
+ * Thread argument
+ */
 typedef struct {
-	int testcase; /* specifies which set of API's to exercise */
-	int numthrds; /* no of pthreads to create */
+	int testcase; /**< specifies which set of API's to exercise */
+	int numthrds; /**< no of pthreads to create */
 } pthrd_arg;
 
 extern void odp_print_system_info(void);
 extern int odp_test_global_init(void);
+/** create thread fro start_routine function */
 extern int odp_test_thread_create(void *(*start_routine) (void *), pthrd_arg *);
 extern int odp_test_thread_exit(pthrd_arg *);