diff options
author | Justin Dickow <jjdickow@gmail.com> | 2015-01-26 11:15:48 -0500 |
---|---|---|
committer | Justin Dickow <jjdickow@gmail.com> | 2015-01-26 11:15:48 -0500 |
commit | 46ed776c537131e72747538488b213cf45f23e22 (patch) | |
tree | 4cad1abf411addfd72ab591c93edeb5d225d9a39 /src/components/transport_manager/include/transport_manager/transport_adapter | |
parent | a24079cb8de5563376dcf782cdb9fe3cae063841 (diff) | |
download | sdl_core-46ed776c537131e72747538488b213cf45f23e22.tar.gz |
Latest internal release - last bulk merge before pull request and gitflow!?
Smoke tested on Ubuntu 12.04
Signed-off-by: Justin Dickow <jjdickow@gmail.com>
Diffstat (limited to 'src/components/transport_manager/include/transport_manager/transport_adapter')
6 files changed, 19 insertions, 28 deletions
diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/client_connection_listener.h b/src/components/transport_manager/include/transport_manager/transport_adapter/client_connection_listener.h index 018dd46810..41658fb45f 100644 --- a/src/components/transport_manager/include/transport_manager/transport_adapter/client_connection_listener.h +++ b/src/components/transport_manager/include/transport_manager/transport_adapter/client_connection_listener.h @@ -1,4 +1,6 @@ -/* +/** + * \file client_connection_listener.h + * \brief ClientConnectionListener class header file. * Copyright (c) 2013, Ford Motor Company * All rights reserved. * diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/connection.h b/src/components/transport_manager/include/transport_manager/transport_adapter/connection.h index d09e9643b1..094cb51921 100644 --- a/src/components/transport_manager/include/transport_manager/transport_adapter/connection.h +++ b/src/components/transport_manager/include/transport_manager/transport_adapter/connection.h @@ -1,4 +1,4 @@ -/* +/** * \file connection.h * \brief Connection class header. * Copyright (c) 2013, Ford Motor Company diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/device_scanner.h b/src/components/transport_manager/include/transport_manager/transport_adapter/device_scanner.h index 36759a9385..5b09a726e5 100644 --- a/src/components/transport_manager/include/transport_manager/transport_adapter/device_scanner.h +++ b/src/components/transport_manager/include/transport_manager/transport_adapter/device_scanner.h @@ -1,4 +1,4 @@ -/* +/** * \file device_scanner.h * \brief DeviceScanner class header file. * Copyright (c) 2013, Ford Motor Company diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/server_connection_factory.h b/src/components/transport_manager/include/transport_manager/transport_adapter/server_connection_factory.h index 19c37aa6a6..d944594d88 100644 --- a/src/components/transport_manager/include/transport_manager/transport_adapter/server_connection_factory.h +++ b/src/components/transport_manager/include/transport_manager/transport_adapter/server_connection_factory.h @@ -1,4 +1,4 @@ -/* +/** * \file server_connection_factory.h * \brief ServerConnectionFactory class header file. * Copyright (c) 2013, Ford Motor Company diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h b/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h index 399ddb1fcf..851f250a88 100644 --- a/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h +++ b/src/components/transport_manager/include/transport_manager/transport_adapter/threaded_socket_connection.h @@ -1,4 +1,4 @@ -/* +/** * \file threaded_socket_connection.h * \brief Header for classes responsible for communication over sockets. * Copyright (c) 2013, Ford Motor Company @@ -41,12 +41,10 @@ #include "transport_manager/transport_adapter/connection.h" #include "protocol/common.h" #include "utils/threads/thread_delegate.h" -#include "utils/lock.h" +#include "utils/threads/thread.h" using ::transport_manager::transport_adapter::Connection; -class Thread; - namespace transport_manager { namespace transport_adapter { @@ -135,7 +133,7 @@ class ThreadedSocketConnection : public Connection, int read_fd_; int write_fd_; void threadMain(); - void exitThreadMain(); + bool exitThreadMain(); void Transmit(); void Finalize(); TransportAdapter::Error Notify() const; @@ -149,7 +147,7 @@ class ThreadedSocketConnection : public Connection, **/ typedef std::queue<protocol_handler::RawMessagePtr> FrameQueue; FrameQueue frames_to_send_; - mutable sync_primitives::Lock frames_to_send_mutex_; + mutable pthread_mutex_t frames_to_send_mutex_; int socket_; bool terminate_flag_; diff --git a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h index f66f1c6bb9..2c27e0d20f 100644 --- a/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h +++ b/src/components/transport_manager/include/transport_manager/transport_adapter/transport_adapter_impl.h @@ -39,8 +39,6 @@ #include <memory> #include <string> -#include "utils/lock.h" -#include "utils/rwlock.h" #include "transport_manager/transport_adapter/transport_adapter.h" #include "transport_manager/transport_adapter/transport_adapter_controller.h" #include "transport_manager/transport_adapter/connection.h" @@ -101,12 +99,6 @@ class TransportAdapterImpl : public TransportAdapter, virtual TransportAdapter::Error Init(); /** - * @brief Stops device adapter - * Called from transport manager to stop device adapter - */ - virtual void Terminate(); - - /** * @brief Add listener to the container(list) of device adapter listeners. * * @param listener Pointer to the device adapter listener. @@ -501,7 +493,7 @@ class TransportAdapterImpl : public TransportAdapter, /** * @brief Mutex restricting access to device map. **/ - mutable sync_primitives::Lock devices_mutex_; + mutable pthread_mutex_t devices_mutex_; /** * @brief Container(map) of connections. @@ -511,16 +503,9 @@ class TransportAdapterImpl : public TransportAdapter, /** * @brief Mutex restricting access to connections map. **/ - mutable sync_primitives::RWLock connections_lock_; + mutable pthread_mutex_t connections_mutex_; protected: -#ifdef TIME_TESTER - /** - * @brief Pointer to time metric observer - */ - TMMetricObserver* metric_observer_; -#endif // TIME_TESTER - /** * @brief Pointer to the device scanner. */ @@ -535,8 +520,14 @@ class TransportAdapterImpl : public TransportAdapter, * @brief Pointer to the factory of connections initiated from client. */ ClientConnectionListener* client_connection_listener_; -}; +#ifdef TIME_TESTER + /** + * @brief Pointer to time metric observer + */ + TMMetricObserver* metric_observer_; +#endif // TIME_TESTER +}; } // namespace transport_adapter } // namespace transport_manager |