Add namespace sensor for Autolock 46/258746/2
authorHyotaek Shim <hyotaek.shim@samsung.com>
Tue, 25 May 2021 05:56:51 +0000 (14:56 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Tue, 25 May 2021 05:58:25 +0000 (14:58 +0900)
Change-Id: Ie5df4a9471cb2dfac519ce37cb195206fe7f5761
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
.gitignore [deleted file]
src/shared/cbase_lock.cpp
src/shared/cbase_lock.h
src/shared/channel.cpp
src/shared/channel.h
src/shared/cmutex.cpp
src/shared/cmutex.h
src/shared/event_loop.cpp
src/shared/event_loop.h

diff --git a/.gitignore b/.gitignore
deleted file mode 100644 (file)
index fa43b1a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-.project
-.cproject
-.*.swp
-nbproject
-.vscode
\ No newline at end of file
index a7d7586..6c39497 100644 (file)
@@ -24,6 +24,8 @@
 #include <cbase_lock.h>
 #include <sensor_log.h>
 
+using namespace sensor;
+
 cbase_lock::cbase_lock()
 {
        m_history_mutex = PTHREAD_MUTEX_INITIALIZER;
index 2de5c7e..5c76040 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <pthread.h>
 
+namespace sensor {
+
 enum lock_type {
        LOCK_TYPE_MUTEX,
        LOCK_TYPE_READ,
@@ -83,5 +85,6 @@ public:
        Autolock(cbase_lock &m, lock_type type);
        ~Autolock();
 };
+}
 
 #endif /* _CBASE_LOCK_H_ */
index 22b0eaa..10ed266 100644 (file)
@@ -30,6 +30,7 @@
 #define SYSTEMD_SOCK_BUF_SIZE (128*1024)
 
 using namespace ipc;
+using namespace sensor;
 
 class send_event_handler : public event_handler
 {
index bc8444f..5af06da 100644 (file)
@@ -74,7 +74,7 @@ private:
        std::vector<uint64_t> m_pending_event_id;
 
        std::atomic<bool> m_connected;
-       cmutex m_cmutex;
+       sensor::cmutex m_cmutex;
 };
 
 }
index 6245b6e..958835c 100644 (file)
@@ -20,6 +20,8 @@
 #include <cmutex.h>
 #include <sensor_log.h>
 
+using namespace sensor;
+
 cmutex::cmutex()
 {
        pthread_mutexattr_t mutex_attr;
index 94aa2b6..343a260 100644 (file)
@@ -21,6 +21,7 @@
 #define _CMUTEX_H_
 
 #include "cbase_lock.h"
+namespace sensor {
 
 class cmutex : public cbase_lock {
 public:
@@ -39,4 +40,5 @@ private:
        pthread_mutex_t m_mutex;
 };
 
+}
 #endif /* _CMUTEX_H_ */
index a49a2e4..e0e9799 100644 (file)
@@ -33,6 +33,7 @@
 #define BAD_HANDLE 0
 
 using namespace ipc;
+using namespace sensor;
 
 static gboolean g_io_handler(GIOChannel *ch, GIOCondition condition, gpointer data)
 {
index 405f628..40fcb2e 100644 (file)
@@ -98,7 +98,7 @@ private:
        std::map<uint64_t, handler_info *> m_handlers;
 
        int m_term_fd;
-       cmutex m_cmutex;
+       sensor::cmutex m_cmutex;
 };
 
 }