aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Legrand <android@legrand.ws>2017-09-10 14:49:36 +0200
committerdev-harsh1998 <harshitjain6751@gmail.com>2017-10-18 12:48:10 +0530
commit1a4616638cf9dbb12b801f040e150587d1b8d655 (patch)
treee511961e62b150cfffb56674830fcfbcc3069a6a
parenta133452b2379980af550ef005524714c360bb0d2 (diff)
a6000: Add atomic lib for missing android_atomic_acquire_load
https://review.lineageos.org/#/c/188451/ Change-Id: I064cde4c4c5351f5702ff3e595261b01283c3088
-rw-r--r--libshims/Android.mk9
-rw-r--r--libshims/lenovo_atomic.cpp21
-rw-r--r--product/qcom-camera.mk5
3 files changed, 33 insertions, 2 deletions
diff --git a/libshims/Android.mk b/libshims/Android.mk
index 5ea84fa..6a42a72 100644
--- a/libshims/Android.mk
+++ b/libshims/Android.mk
@@ -34,3 +34,12 @@ LOCAL_MODULE := libshims_get_process_name
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := lenovo_atomic.cpp
+LOCAL_SHARED_LIBRARIES := libcutils
+LOCAL_MODULE := libshim_atomic
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/libshims/lenovo_atomic.cpp b/libshims/lenovo_atomic.cpp
new file mode 100644
index 0000000..3a159e2
--- /dev/null
+++ b/libshims/lenovo_atomic.cpp
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2017 The LineageOS Project
+ *
+ * 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 <string>
+#define ANDROID_ATOMIC_INLINE
+extern "C" {
+#include <cutils/atomic.h>
+}
diff --git a/product/qcom-camera.mk b/product/qcom-camera.mk
index df15ab7..92ec4f0 100644
--- a/product/qcom-camera.mk
+++ b/product/qcom-camera.mk
@@ -4,11 +4,12 @@ PRODUCT_PACKAGES += \
camera.device@3.2-impl \
camera.msm8916 \
libmm-qcamera \
+ libshim_atomic \
Snap
# Build libstlport for vendor blobs
-PRODUCT_PACKAGES += \
- libstlport
+#PRODUCT_PACKAGES += \
+# libstlport
# Permissions
PRODUCT_COPY_FILES += \