aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Bhole <[email protected]>2011-03-03 17:04:56 -0500
committerDeepak Bhole <[email protected]>2011-03-03 17:04:56 -0500
commit98fe68de729d68ed362bf24e8b318343a22b1aa8 (patch)
tree8bb406affa6cd314da2774af4cf442e817318ac4
parent6d523c8c11ffa7913ca1b0836d51f163ba3e268e (diff)
Minor cleanup of C++ code -- removed unused thread_counter
-rw-r--r--ChangeLog11
-rw-r--r--plugin/icedteanp/IcedTeaPluginRequestProcessor.cc23
-rw-r--r--plugin/icedteanp/IcedTeaPluginRequestProcessor.h3
3 files changed, 11 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index c68ea44..7301a12 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-03-03 Deepak Bhole <[email protected]>
+
+ * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
+ (PluginRequestProcessor): Remove initialization of tc_mutex
+ (~PluginRequestProcessor): Remove destruction of tc_mutex
+ (sendString): Removed thread count incrementer code.
+ (setMember): Same.
+ (sendMember): Same.
+ * plugin/icedteanp/IcedTeaPluginRequestProcessor.h: Removed tc_mutex and
+ thread_count variables.
+
2011-03-02 Omair Majid <[email protected]>
Fix PR612.
diff --git a/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc b/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
index db3a4d6..1e49515 100644
--- a/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
+++ b/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc
@@ -66,7 +66,6 @@ PluginRequestProcessor::PluginRequestProcessor()
pthread_mutex_init(&message_queue_mutex, NULL);
pthread_mutex_init(&syn_write_mutex, NULL);
- pthread_mutex_init(&tc_mutex, NULL);
pthread_cond_init(&cond_message_available, NULL);
}
@@ -86,7 +85,6 @@ PluginRequestProcessor::~PluginRequestProcessor()
pthread_mutex_destroy(&message_queue_mutex);
pthread_mutex_destroy(&syn_write_mutex);
- pthread_mutex_destroy(&tc_mutex);
pthread_cond_destroy(&cond_message_available);
}
@@ -415,12 +413,6 @@ PluginRequestProcessor::sendString(std::vector<std::string*>* message_parts)
response += thread_data.result;
plugin_to_java_bus->post(response.c_str());
-
- cleanup:
-
- pthread_mutex_lock(&tc_mutex);
- thread_count--;
- pthread_mutex_unlock(&tc_mutex);
}
/**
@@ -508,13 +500,6 @@ PluginRequestProcessor::setMember(std::vector<std::string*>* message_parts)
IcedTeaPluginUtilities::constructMessagePrefix(0, reference, &response);
response.append(" JavaScriptSetMember ");
plugin_to_java_bus->post(response.c_str());
-
- cleanup:
-
- // property_name, type and value are deleted by _setMember
- pthread_mutex_lock(&tc_mutex);
- thread_count--;
- pthread_mutex_unlock(&tc_mutex);
}
/**
@@ -660,14 +645,6 @@ PluginRequestProcessor::sendMember(std::vector<std::string*>* message_parts)
}
response.append(java_result->return_string->c_str());
plugin_to_java_bus->post(response.c_str());
-
-
- // Now be a good citizen and help keep the heap free of garbage
- cleanup:
-
- pthread_mutex_lock(&tc_mutex);
- thread_count--;
- pthread_mutex_unlock(&tc_mutex);
}
/**
diff --git a/plugin/icedteanp/IcedTeaPluginRequestProcessor.h b/plugin/icedteanp/IcedTeaPluginRequestProcessor.h
index 4d31248..2a7846e 100644
--- a/plugin/icedteanp/IcedTeaPluginRequestProcessor.h
+++ b/plugin/icedteanp/IcedTeaPluginRequestProcessor.h
@@ -84,9 +84,6 @@ void _call(void* data);
void _eval(void* data);
void _getString(void* data);
-static pthread_mutex_t tc_mutex = PTHREAD_MUTEX_INITIALIZER;
-static int thread_count = 0;
-
void* queue_processor(void* data);
/* Mutex to ensure that the request queue is accessed synchronously */