Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba5aaae9 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11192287 from 7a04f377 to 24Q1-release

Change-Id: I9b469ad291c3956cf0b331a5a381a84754b8914b
parents 3429536c 7a04f377
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -72,14 +72,10 @@ bool timeout(std::chrono::duration<R, P> delay, std::function<void(void)> &&func
        return false;
    }
    bool success = state.wait(now + delay);
    if (success) {
        pthread_join(thread, nullptr);
    } else {
        // b/311143089: Abandon this background thread. Resources for a detached
        // thread are cleaned up when it is terminated. If the background thread
        // is stalled, it will be terminated when returning from main().
        pthread_detach(thread);
    if (!success) {
        pthread_kill(thread, SIGINT);
    }
    pthread_join(thread, nullptr);
    return success;
}

+0 −1
Original line number Diff line number Diff line
@@ -18,6 +18,5 @@

int main(int argc, char **argv) {
    using namespace ::android::lshal;
    // Background pthreads from timeout() are destroyed upon returning from main().
    return Lshal{}.main(Arg{argc, argv});
}
+15 −9
Original line number Diff line number Diff line
@@ -106,6 +106,17 @@ cc_defaults {
    header_libs: [
        "libbinder_headers",
    ],

    cflags: [
        "-Wextra",
        "-Wextra-semi",
        "-Werror",
        "-Wzero-as-null-pointer-constant",
        "-Wreorder-init-list",
        "-Wunused-const-variable",
        "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION",
        "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION",
    ],
}

cc_defaults {
@@ -135,15 +146,6 @@ cc_defaults {
        export_aidl_headers: true,
    },

    cflags: [
        "-Wextra",
        "-Wextra-semi",
        "-Werror",
        "-Wzero-as-null-pointer-constant",
        "-Wreorder-init-list",
        "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION",
        "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION",
    ],
    product_variables: {
        debuggable: {
            cflags: [
@@ -220,6 +222,10 @@ cc_defaults {

    cflags: [
        "-DBINDER_RPC_SINGLE_THREADED",
        "-DBINDER_ENABLE_LIBLOG_ASSERT",
        "-DBINDER_DISABLE_NATIVE_HANDLE",
        "-DBINDER_DISABLE_BLOB",
        "-DBINDER_NO_LIBBASE",
        // Trusty libbinder uses vendor stability for its binders
        "-D__ANDROID_VNDK__",
        "-U__ANDROID__",
+12 −1
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ static std::atomic<size_t> gParcelGlobalAllocSize;
constexpr size_t kMaxFds = 1024;

// Maximum size of a blob to transfer in-place.
static const size_t BLOB_INPLACE_LIMIT = 16 * 1024;
[[maybe_unused]] static const size_t BLOB_INPLACE_LIMIT = 16 * 1024;

#if defined(__BIONIC__)
static void FdTag(int fd, const void* old_addr, const void* new_addr) {
@@ -886,6 +886,9 @@ void Parcel::updateWorkSourceRequestHeaderPosition() const {
}

#ifdef BINDER_WITH_KERNEL_IPC

#if defined(__ANDROID__)

#if defined(__ANDROID_VNDK__)
constexpr int32_t kHeader = B_PACK_CHARS('V', 'N', 'D', 'R');
#elif defined(__ANDROID_RECOVERY__)
@@ -893,6 +896,14 @@ constexpr int32_t kHeader = B_PACK_CHARS('R', 'E', 'C', 'O');
#else
constexpr int32_t kHeader = B_PACK_CHARS('S', 'Y', 'S', 'T');
#endif

#else // ANDROID not defined

// If kernel binder is used in new environments, we need to make sure it's separated
// out and has a separate header.
constexpr int32_t kHeader = B_PACK_CHARS('U', 'N', 'K', 'N');
#endif

#endif // BINDER_WITH_KERNEL_IPC

// Write RPC headers.  (previously just the interface token)
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@

#ifdef BINDER_NO_LIBBASE

#include "Utils.h"

#include <stdint.h>

// clang-format off
Loading