From 98fe68de729d68ed362bf24e8b318343a22b1aa8 Mon Sep 17 00:00:00 2001 From: Deepak Bhole Date: Thu, 3 Mar 2011 17:04:56 -0500 Subject: Minor cleanup of C++ code -- removed unused thread_counter --- plugin/icedteanp/IcedTeaPluginRequestProcessor.cc | 23 ----------------------- plugin/icedteanp/IcedTeaPluginRequestProcessor.h | 3 --- 2 files changed, 26 deletions(-) (limited to 'plugin/icedteanp') 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* 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* 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* 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 */ -- cgit v1.2.3