Deleting unused file crw_lock.h and crw_lock.cpp 82/49982/1
authorAnkur <ankur29.garg@samsung.com>
Thu, 22 Oct 2015 09:11:12 +0000 (14:41 +0530)
committerAnkur <ankur29.garg@samsung.com>
Thu, 22 Oct 2015 09:11:15 +0000 (14:41 +0530)
this class was not being used anywhere.

Change-Id: Ib379cb65bae7de550b470fe00b7f490c73e20bd0

src/shared/CMakeLists.txt
src/shared/crw_lock.cpp [deleted file]
src/shared/crw_lock.h [deleted file]

index 91c6b32..dc5c9b3 100644 (file)
@@ -18,7 +18,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
 include_directories(${CMAKE_SOURCE_DIR}/src/libsensord)
 
 add_library(sensord-server SHARED
-       crw_lock.cpp
        worker_thread.cpp
        cconfig.cpp
        csensor_config.cpp
@@ -56,7 +55,6 @@ install(TARGETS sensord-share DESTINATION ${CMAKE_INSTALL_LIBDIR})
 install(FILES sensord-server.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
 install(FILES ${PROJECT_NAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
 install(FILES
-       crw_lock.h
        worker_thread.h
        cconfig.h
        csensor_config.h
diff --git a/src/shared/crw_lock.cpp b/src/shared/crw_lock.cpp
deleted file mode 100755 (executable)
index 6470f6c..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * libsensord-share
- *
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "crw_lock.h"
-#include "common.h"
-
-
-crw_lock::crw_lock()
-{
-       m_rw_lock = PTHREAD_RWLOCK_INITIALIZER;
-}
-
-crw_lock::~crw_lock()
-{
-       pthread_rwlock_destroy(&m_rw_lock);
-}
-
-void crw_lock::read_lock()
-{
-#ifdef _LOCK_DEBUG
-       cbase_lock::lock(LOCK_TYPE_READ, "read lock", __MODULE__, __func__, __LINE__);
-#else
-       cbase_lock::lock(LOCK_TYPE_READ);
-#endif
-}
-
-void crw_lock::write_lock()
-{
-#ifdef _LOCK_DEBUG
-       cbase_lock::lock(LOCK_TYPE_WRITE, "write lock", __MODULE__, __func__, __LINE__);
-#else
-       cbase_lock::lock(LOCK_TYPE_WRITE);
-#endif
-}
-
-int crw_lock::read_lock_impl(void)
-{
-       return pthread_rwlock_rdlock(&m_rw_lock);
-}
-int crw_lock::write_lock_impl(void)
-{
-       return pthread_rwlock_wrlock(&m_rw_lock);
-}
-
-int crw_lock::try_read_lock_impl(void)
-{
-       return pthread_rwlock_tryrdlock(&m_rw_lock);
-}
-
-int crw_lock::try_write_lock_impl(void)
-{
-       return pthread_rwlock_trywrlock(&m_rw_lock);
-}
-
-int crw_lock::unlock_impl()
-{
-       return pthread_rwlock_unlock(&m_rw_lock);
-}
diff --git a/src/shared/crw_lock.h b/src/shared/crw_lock.h
deleted file mode 100755 (executable)
index b2a33b3..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * libsensord-share
- *
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#if !defined(_CRW_LOCK_CLASS_H_)
-#define _CRW_LOCK_CLASS_H_
-
-#include "cbase_lock.h"
-
-class crw_lock : public cbase_lock
-{
-public:
-       crw_lock();
-       virtual ~crw_lock();
-
-       void read_lock();
-       void write_lock();
-
-protected:
-       int read_lock_impl(void);
-       int write_lock_impl(void);
-
-       int try_read_lock_impl(void);
-       int try_write_lock_impl(void);
-       int unlock_impl();
-private:
-       pthread_rwlock_t m_rw_lock;
-};
-
-#endif
-// End of a file