From: Jim Meyering <meyer...@redhat.com>

* exec/wthread.c (struct worker_thread_t): Rename from
struct worker_thread.
(start_worker_thread): Rename from function "worker_thread".
* exec/wthread.h (struct worker_thread_group) [threads]: Update
member type: s/struct worker_thread/struct worker_thread_t/
---
 exec/wthread.c |   14 +++++++-------
 exec/wthread.h |    2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/exec/wthread.c b/exec/wthread.c
index aeabb8b..791fb42 100644
--- a/exec/wthread.c
+++ b/exec/wthread.c
@@ -52,7 +52,7 @@ struct thread_data {
        void *data;
 };

-struct worker_thread {
+struct worker_thread_t {
        struct worker_thread_group *worker_thread_group;
        pthread_mutex_t new_work_mutex;
        pthread_cond_t new_work_cond;
@@ -65,10 +65,10 @@ struct worker_thread {
        struct thread_data thread_data;
 };

-static void *worker_thread (void *thread_data_in) {
+static void *start_worker_thread (void *thread_data_in) {
        struct thread_data *thread_data = (struct thread_data *)thread_data_in;
-       struct worker_thread *worker_thread =
-               (struct worker_thread *)thread_data->data;
+       struct worker_thread_t *worker_thread =
+               (struct worker_thread_t *)thread_data->data;
        void *data_for_worker_fn;

        for (;;) {
@@ -112,7 +112,7 @@ int worker_thread_group_init (
        worker_thread_group->threadcount = threads;
        worker_thread_group->last_scheduled = 0;
        worker_thread_group->worker_fn = worker_fn;
-       worker_thread_group->threads = malloc (sizeof (struct worker_thread) *
+       worker_thread_group->threads = malloc (sizeof (struct worker_thread_t) *
                threads);
        if (worker_thread_group->threads == 0) {
                return (-1);
@@ -139,7 +139,7 @@ int worker_thread_group_init (
                        worker_thread_group->threads[i].thread_state;
                worker_thread_group->threads[i].thread_data.data = 
&worker_thread_group->threads[i];
                pthread_create (&worker_thread_group->threads[i].thread_id,
-                       NULL, worker_thread, 
&worker_thread_group->threads[i].thread_data);
+                       NULL, start_worker_thread, 
&worker_thread_group->threads[i].thread_data);
        }
        return (0);
 }
@@ -201,7 +201,7 @@ void worker_thread_group_atsegv (
        struct worker_thread_group *worker_thread_group)
 {
        void *data_for_worker_fn;
-       struct worker_thread *worker_thread;
+       struct worker_thread_t *worker_thread;
        unsigned int i;

        for (i = 0; i < worker_thread_group->threadcount; i++) {
diff --git a/exec/wthread.h b/exec/wthread.h
index 7301a25..374897e 100644
--- a/exec/wthread.h
+++ b/exec/wthread.h
@@ -38,7 +38,7 @@
 struct worker_thread_group {
        int threadcount;
        int last_scheduled;
-       struct worker_thread *threads;
+       struct worker_thread_t *threads;
        void (*worker_fn) (void *thread_state, void *work_item);
 };

-- 
1.6.3.rc0.154.g06890

_______________________________________________
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to