Loading system/hci/src/btsnoop.cc +2 −2 Original line number Diff line number Diff line Loading @@ -92,8 +92,8 @@ static future_t* start_up(void) { delete_btsnoop_files(); } else { open_next_snoop_file(); packets_per_file = property_get_int32(BTSNOOP_MAX_PACKETS_PROPERTY, DEFAULT_BTSNOOP_SIZE); packets_per_file = osi_property_get_int32(BTSNOOP_MAX_PACKETS_PROPERTY, DEFAULT_BTSNOOP_SIZE); btsnoop_net_open(); } Loading system/osi/BUILD.gn +0 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ static_library("osi") { "src/buffer.cc", "src/compat.cc", "src/config.cc", "src/data_dispatcher.cc", "src/fixed_queue.cc", "src/future.cc", "src/hash_map_utils.cc", Loading Loading @@ -67,7 +66,6 @@ executable("net_test_osi") { "test/allocator_test.cc", "test/array_test.cc", "test/config_test.cc", "test/data_dispatcher_test.cc", "test/future_test.cc", "test/hash_map_utils_test.cc", "test/leaky_bonded_queue_test.cc", Loading system/osi/include/properties.h +8 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #pragma once #include <cstdint> #if defined(OS_GENERIC) #define PROPERTY_VALUE_MAX 92 #else Loading @@ -35,3 +36,10 @@ int osi_property_get(const char* key, char* value, const char* default_value); // Write value of property associated with key |key| to |value|. // Returns 0 on success, < 0 on failure int osi_property_set(const char* key, const char* value); // Adapter function for property_get_int32 in // libcutils/include/cutils/properties.h // // returns the value of |key| truncated and coerced into an // int32_t. If the property is not set, then the |default_value| is used. int32_t osi_property_get_int32(const char* key, int32_t default_value); system/osi/src/alarm.cc +1 −1 Original line number Diff line number Diff line Loading @@ -633,7 +633,7 @@ static bool timer_create_internal(const clockid_t clock_id, timer_t* timer) { memset(&sigevent, 0, sizeof(sigevent)); sigevent.sigev_notify = SIGEV_THREAD; sigevent.sigev_notify_function = (void (*)(union sigval))timer_callback; sigevent.sigev_notify_attributes = (void*)(&thread_attr); sigevent.sigev_notify_attributes = &thread_attr; if (timer_create(clock_id, &sigevent, timer) == -1) { LOG_ERROR(LOG_TAG, "%s unable to create timer with clock %d: %s", __func__, clock_id, strerror(errno)); Loading system/osi/src/properties.cc +8 −0 Original line number Diff line number Diff line Loading @@ -44,3 +44,11 @@ int osi_property_set(const char* key, const char* value) { return property_set(key, value); #endif // defined(OS_GENERIC) } int32_t osi_property_get_int32(const char* key, int32_t default_value) { #if defined(OS_GENERIC) return default_value; #else return property_get_int32(key, default_value); #endif // defined(OS_GENERIC) } Loading
system/hci/src/btsnoop.cc +2 −2 Original line number Diff line number Diff line Loading @@ -92,8 +92,8 @@ static future_t* start_up(void) { delete_btsnoop_files(); } else { open_next_snoop_file(); packets_per_file = property_get_int32(BTSNOOP_MAX_PACKETS_PROPERTY, DEFAULT_BTSNOOP_SIZE); packets_per_file = osi_property_get_int32(BTSNOOP_MAX_PACKETS_PROPERTY, DEFAULT_BTSNOOP_SIZE); btsnoop_net_open(); } Loading
system/osi/BUILD.gn +0 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ static_library("osi") { "src/buffer.cc", "src/compat.cc", "src/config.cc", "src/data_dispatcher.cc", "src/fixed_queue.cc", "src/future.cc", "src/hash_map_utils.cc", Loading Loading @@ -67,7 +66,6 @@ executable("net_test_osi") { "test/allocator_test.cc", "test/array_test.cc", "test/config_test.cc", "test/data_dispatcher_test.cc", "test/future_test.cc", "test/hash_map_utils_test.cc", "test/leaky_bonded_queue_test.cc", Loading
system/osi/include/properties.h +8 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #pragma once #include <cstdint> #if defined(OS_GENERIC) #define PROPERTY_VALUE_MAX 92 #else Loading @@ -35,3 +36,10 @@ int osi_property_get(const char* key, char* value, const char* default_value); // Write value of property associated with key |key| to |value|. // Returns 0 on success, < 0 on failure int osi_property_set(const char* key, const char* value); // Adapter function for property_get_int32 in // libcutils/include/cutils/properties.h // // returns the value of |key| truncated and coerced into an // int32_t. If the property is not set, then the |default_value| is used. int32_t osi_property_get_int32(const char* key, int32_t default_value);
system/osi/src/alarm.cc +1 −1 Original line number Diff line number Diff line Loading @@ -633,7 +633,7 @@ static bool timer_create_internal(const clockid_t clock_id, timer_t* timer) { memset(&sigevent, 0, sizeof(sigevent)); sigevent.sigev_notify = SIGEV_THREAD; sigevent.sigev_notify_function = (void (*)(union sigval))timer_callback; sigevent.sigev_notify_attributes = (void*)(&thread_attr); sigevent.sigev_notify_attributes = &thread_attr; if (timer_create(clock_id, &sigevent, timer) == -1) { LOG_ERROR(LOG_TAG, "%s unable to create timer with clock %d: %s", __func__, clock_id, strerror(errno)); Loading
system/osi/src/properties.cc +8 −0 Original line number Diff line number Diff line Loading @@ -44,3 +44,11 @@ int osi_property_set(const char* key, const char* value) { return property_set(key, value); #endif // defined(OS_GENERIC) } int32_t osi_property_get_int32(const char* key, int32_t default_value) { #if defined(OS_GENERIC) return default_value; #else return property_get_int32(key, default_value); #endif // defined(OS_GENERIC) }