[7885] wlbt :ND Offload's Implementation.
[GitHub/LineageOS/android_hardware_samsung_slsi_scsc_wifibt_wifi_hal.git] / sync.h
diff --git a/sync.h b/sync.h
index 1dc0841b027c04f7b3f77f17d8b36f2a767ff9fd..cea2ea933f88117a2a93b9b4c8c1530fa3aa105c 100755 (executable)
--- a/sync.h
+++ b/sync.h
@@ -1,54 +1,54 @@
-\r
-#include <pthread.h>\r
-\r
-#ifndef __WIFI_HAL_SYNC_H__\r
-#define __WIFI_HAL_SYNC_H__\r
-\r
-class Mutex\r
-{\r
-private:\r
-    pthread_mutex_t mMutex;\r
-public:\r
-    Mutex() {\r
-        pthread_mutex_init(&mMutex, NULL);\r
-    }\r
-    ~Mutex() {\r
-        pthread_mutex_destroy(&mMutex);\r
-    }\r
-    int tryLock() {\r
-        return pthread_mutex_trylock(&mMutex);\r
-    }\r
-    int lock() {\r
-        return pthread_mutex_lock(&mMutex);\r
-    }\r
-    void unlock() {\r
-        pthread_mutex_unlock(&mMutex);\r
-    }\r
-};\r
-\r
-class Condition\r
-{\r
-private:\r
-    pthread_cond_t mCondition;\r
-    pthread_mutex_t mMutex;\r
-\r
-public:\r
-    Condition() {\r
-        pthread_mutex_init(&mMutex, NULL);\r
-        pthread_cond_init(&mCondition, NULL);\r
-    }\r
-    ~Condition() {\r
-        pthread_cond_destroy(&mCondition);\r
-        pthread_mutex_destroy(&mMutex);\r
-    }\r
-\r
-    int wait() {\r
-        return pthread_cond_wait(&mCondition, &mMutex);\r
-    }\r
-\r
-    void signal() {\r
-        pthread_cond_signal(&mCondition);\r
-    }\r
-};\r
-\r
+
+#include <pthread.h>
+
+#ifndef __WIFI_HAL_SYNC_H__
+#define __WIFI_HAL_SYNC_H__
+
+class Mutex
+{
+private:
+    pthread_mutex_t mMutex;
+public:
+    Mutex() {
+        pthread_mutex_init(&mMutex, NULL);
+    }
+    ~Mutex() {
+        pthread_mutex_destroy(&mMutex);
+    }
+    int tryLock() {
+        return pthread_mutex_trylock(&mMutex);
+    }
+    int lock() {
+        return pthread_mutex_lock(&mMutex);
+    }
+    void unlock() {
+        pthread_mutex_unlock(&mMutex);
+    }
+};
+
+class Condition
+{
+private:
+    pthread_cond_t mCondition;
+    pthread_mutex_t mMutex;
+
+public:
+    Condition() {
+        pthread_mutex_init(&mMutex, NULL);
+        pthread_cond_init(&mCondition, NULL);
+    }
+    ~Condition() {
+        pthread_cond_destroy(&mCondition);
+        pthread_mutex_destroy(&mMutex);
+    }
+
+    int wait() {
+        return pthread_cond_wait(&mCondition, &mMutex);
+    }
+
+    void signal() {
+        pthread_cond_signal(&mCondition);
+    }
+};
+
 #endif
\ No newline at end of file