Home
last modified time | relevance | path

Searched refs:T (Results 1 – 25 of 128) sorted by relevance

123456

/system/core/include/log/
Dlog_read.h39 log_time(const timespec &T) in log_time()
41 tv_sec = T.tv_sec; in log_time()
42 tv_nsec = T.tv_nsec; in log_time()
55 timespec T; in log_time() local
56 clock_gettime(id, &T); in log_time()
57 tv_sec = T.tv_sec; in log_time()
58 tv_nsec = T.tv_nsec; in log_time()
60 log_time(const char *T) in log_time()
62 const uint8_t *c = (const uint8_t *) T; in log_time()
68 bool operator== (const timespec &T) const
[all …]
Dlogger.h106 bool operator== (const log_msg &T) const
108 return (entry.sec == T.entry.sec) && (entry.nsec == T.entry.nsec);
110 bool operator!= (const log_msg &T) const
112 return !(*this == T);
114 bool operator< (const log_msg &T) const
116 return (entry.sec < T.entry.sec)
117 || ((entry.sec == T.entry.sec)
118 && (entry.nsec < T.entry.nsec));
120 bool operator>= (const log_msg &T) const
122 return !(*this < T);
[all …]
/system/core/include/utils/
DFlattenable.h61 template<typename T>
62 static void write(void*& buffer, size_t& size, const T& value) { in write()
63 *static_cast<T*>(buffer) = value; in write()
64 advance(buffer, size, sizeof(T)); in write()
68 template<typename T>
69 static void read(void const*& buffer, size_t& size, T& value) { in read()
70 value = *static_cast<T const*>(buffer); in read()
71 advance(buffer, size, sizeof(T)); in read()
82 template <typename T>
108 template<typename T>
[all …]
DStrongPointer.h29 template<typename T> class wp;
34 inline bool operator _op_ (const sp<T>& o) const { \
37 inline bool operator _op_ (const T* o) const { \
48 inline bool operator _op_ (const wp<T>& o) const { \
58 template<typename T>
63 sp(T* other);
64 sp(const sp<T>& other);
65 sp(sp<T>&& other);
74 sp& operator = (T* other);
75 sp& operator = (const sp<T>& other);
[all …]
DRefBase.h39 inline bool operator _op_ (const sp<T>& o) const { \
42 inline bool operator _op_ (const T* o) const { \
173 template <class T>
184 delete static_cast<const T*>(this); in decStrong()
192 typedef LightRefBase<T> basetype;
200 inline static void renameRefId(T* ref, in renameRefId()
216 template <typename T>
224 wp(T* other);
225 wp(const wp<T>& other);
226 wp(const sp<T>& other);
[all …]
DTypeHelpers.h33 template <typename T> struct trait_trivial_ctor { enum { value = false }; };
34 template <typename T> struct trait_trivial_dtor { enum { value = false }; };
35 template <typename T> struct trait_trivial_copy { enum { value = false }; };
36 template <typename T> struct trait_trivial_move { enum { value = false }; };
37 template <typename T> struct trait_pointer { enum { value = false }; };
38 template <typename T> struct trait_pointer<T*> { enum { value = true }; };
56 template <typename T, typename U>
61 traits<T>::has_trivial_ctor && traits<U>::has_trivial_ctor,
63 traits<T>::has_trivial_dtor && traits<U>::has_trivial_dtor,
65 traits<T>::has_trivial_copy && traits<U>::has_trivial_copy,
[all …]
/system/core/libmemunreachable/
DAllocator.h34 template<typename T>
62 template<class T>
63 T* allocate() { in allocate()
64 return reinterpret_cast<T*>(allocate(sizeof(T))); in allocate()
77 template<class T>
78 using unique_ptr = std::unique_ptr<T, std::function<void(void*)>>;
80 template<class T, class... Args>
81 unique_ptr<T> make_unique(Args&&... args) { in make_unique()
83 return unique_ptr<T>(new (allocate<T>()) T(std::forward<Args>(args)...), in make_unique()
85 reinterpret_cast<T*>(ptr)->~T(); in make_unique()
[all …]
DTarjan.h26 template<class T>
29 allocator::set<Node<T>*> references_in;
30 allocator::set<Node<T>*> references_out;
34 T* ptr;
36 Node(T* ptr, Allocator<Node> allocator) : references_in(allocator), references_out(allocator), in Node()
39 void Edge(Node<T>* ref) { in Edge()
50 DISALLOW_COPY_AND_ASSIGN(Node<T>);
53 template<class T>
54 using Graph = allocator::vector<Node<T>*>;
56 template<class T>
[all …]
DLeakPipe.h104 template<typename T>
105 bool Send(const T& value) { in Send()
106 ssize_t ret = TEMP_FAILURE_RETRY(write(fd_, &value, sizeof(T))); in Send()
110 } else if (static_cast<size_t>(ret) != sizeof(T)) { in Send()
118 template<class T, class Alloc = std::allocator<T>>
119 bool SendVector(const std::vector<T, Alloc>& vector) { in SendVector() argument
120 size_t size = vector.size() * sizeof(T); in SendVector()
142 template<typename T>
143 bool Receive(T* value) { in Receive()
144 ssize_t ret = TEMP_FAILURE_RETRY(read(fd_, reinterpret_cast<void*>(value), sizeof(T))); in Receive()
[all …]
DLinkedList.h20 template<class T>
24 LinkedList(T data) : LinkedList() { in LinkedList()
28 void insert(LinkedList<T>& node) { in insert()
41 T data() { return data_; } in data()
43 LinkedList<T> *next() { return next_; } in next()
45 LinkedList<T> *next_;
46 LinkedList<T> *prev_;
47 T data_;
50 template<class T>
57 LinkedList<T> node_;
/system/core/libpixelflinger/codeflinger/tinyutils/
Dsmartpointer.h31 inline bool operator _op_ (const sp<T>& o) const { \
34 inline bool operator _op_ (const T* o) const { \
48 template <typename T>
54 sp(T* other);
55 sp(const sp<T>& other);
63 sp& operator = (T* other);
64 sp& operator = (const sp<T>& other);
74 inline T& operator* () const { return *m_ptr; }
75 inline T* operator-> () const { return m_ptr; }
76 inline T* get() const { return m_ptr; } in get()
[all …]
/system/update_engine/update_manager/
Dgeneric_variables.h50 template<typename T>
51 class PollCopyVariable : public Variable<T> {
58 PollCopyVariable(const std::string& name, const T& ref, const bool* is_set_p, in PollCopyVariable()
60 : Variable<T>(name, kVariableModePoll), ref_(ref), is_set_p_(is_set_p), in PollCopyVariable()
62 PollCopyVariable(const std::string& name, const T& ref, const bool* is_set_p) in PollCopyVariable()
64 PollCopyVariable(const std::string& name, const T& ref) in PollCopyVariable()
68 const T& ref, const bool* is_set_p, in PollCopyVariable()
70 : Variable<T>(name, poll_interval), ref_(ref), is_set_p_(is_set_p), in PollCopyVariable()
73 const T& ref, const bool* is_set_p) in PollCopyVariable()
76 const T& ref) in PollCopyVariable()
[all …]
Dfake_variable.h29 template<typename T>
30 class FakeVariable : public Variable<T> {
33 : Variable<T>(name, mode) {} in FakeVariable()
35 : Variable<T>(name, poll_interval) {} in FakeVariable()
42 void reset(const T* p_value) { in reset()
48 Variable<T>::NotifyValueChanged(); in NotifyValueChanged()
57 const T* GetValue(base::TimeDelta /* timeout */, in GetValue()
67 std::unique_ptr<const T> ptr_;
Dumtest_utils.h40 template<typename T>
41 static void ExpectVariableHasValue(const T& expected, Variable<T>* variable) { in ExpectVariableHasValue()
43 std::unique_ptr<const T> value( in ExpectVariableHasValue()
50 template<typename T>
51 static void ExpectVariableNotSet(Variable<T>* variable) { in ExpectVariableNotSet()
53 std::unique_ptr<const T> value( in ExpectVariableNotSet()
/system/connectivity/shill/
Dproperty_accessor.h57 template <class T>
58 class PropertyAccessor : public AccessorInterface<T> {
60 explicit PropertyAccessor(T* property) in PropertyAccessor()
67 T Get(Error* /*error*/) override { return *property_; } in Get()
68 bool Set(const T& value, Error* /*error*/) override { in Set()
77 T* const property_;
78 const T default_value_;
82 template <class T>
83 class ConstPropertyAccessor : public AccessorInterface<T> {
85 explicit ConstPropertyAccessor(const T* property) : property_(property) { in ConstPropertyAccessor()
[all …]
/system/core/liblog/tests/
Dbenchmark.h30 template <typename T> class BenchmarkWantsArg;
31 template <typename T> class BenchmarkWithArg;
58 template <typename T>
61 BenchmarkWantsArgBase(const char* name, void (*fn)(int, T)) : Benchmark(name) { in BenchmarkWantsArgBase() argument
65 BenchmarkWantsArgBase<T>* Arg(const char* arg_name, T arg) { in Arg()
66 BenchmarkRegister(new BenchmarkWithArg<T>(name_, fn_arg_, arg_name, arg)); in Arg()
72 void (*fn_arg_)(int, T);
75 template <typename T>
76 class BenchmarkWithArg : public BenchmarkWantsArg<T> {
78 BenchmarkWithArg(const char* name, void (*fn)(int, T), const char* arg_name, T arg) : in BenchmarkWithArg() argument
[all …]
/system/keymaster/include/keymaster/
Dandroid_keymaster_utils.h53 template <typename T, size_t N> inline size_t array_size(const T (&a)[N]) { in array_size()
60 template <typename T, size_t N> inline size_t array_length(const T (&)[N]) { in array_length()
68 template <typename T> inline T* dup_array(const T* a, size_t n) { in dup_array()
69 T* dup = new (std::nothrow) T[n]; in dup_array()
81 template <typename T, size_t N> inline T* dup_array(const T (&a)[N]) { in dup_array()
94 template <typename T, size_t N> inline void copy_array(const T (&arr)[N], T* dest) { in copy_array()
104 template <typename T, size_t N> inline bool array_contains(const T (&a)[N], T val) { in array_contains()
144 template <typename T> explicit Eraser(T* t);
146 template <typename T>
147 explicit Eraser(T& t) : buf_(reinterpret_cast<uint8_t*>(&t)), size_(sizeof(t)) {} in Eraser()
[all …]
/system/bt/service/ipc/binder/
Dremote_callback_list.h52 template<typename T>
62 bool Register(const android::sp<T>& callback);
63 bool Unregister(const android::sp<T>& callback);
67 void ForEach(const std::function<void(T*)>& callback);
72 CallbackDeathRecipient(const android::sp<T>& callback,
75 android::sp<T> get_callback() const { return callback_; } in get_callback()
81 android::sp<T> callback_;
82 RemoteCallbackList<T>* owner_; // weak
106 template<typename T>
107 RemoteCallbackList<T>::~RemoteCallbackList() { in ~RemoteCallbackList()
[all …]
/system/core/base/include/android-base/
Dparseint.h31 template <typename T>
32 bool ParseUint(const char* s, T* out,
33 T max = std::numeric_limits<T>::max()) {
44 *out = static_cast<T>(result);
52 template <typename T>
53 bool ParseInt(const char* s, T* out,
54 T min = std::numeric_limits<T>::min(),
55 T max = std::numeric_limits<T>::max()) {
66 *out = static_cast<T>(result);
Dmemory.h26 template <typename T>
27 static inline T get_unaligned(const T* address) { in get_unaligned()
29 T v; in get_unaligned()
35 template <typename T>
36 static inline void put_unaligned(T* address, T v) { in put_unaligned()
38 T v; in put_unaligned()
/system/core/liblog/
Dlog_time.cpp137 LIBLOG_ABI_PRIVATE log_time log_time::operator-= (const timespec &T) { in operator -=() argument
139 if (*this <= T) { in operator -=()
143 if (this->tv_nsec < (unsigned long int)T.tv_nsec) { in operator -=()
145 this->tv_nsec = NS_PER_SEC + this->tv_nsec - T.tv_nsec; in operator -=()
147 this->tv_nsec -= T.tv_nsec; in operator -=()
149 this->tv_sec -= T.tv_sec; in operator -=()
154 LIBLOG_ABI_PRIVATE log_time log_time::operator+= (const timespec &T) { in operator +=() argument
155 this->tv_nsec += (unsigned long int)T.tv_nsec; in operator +=()
160 this->tv_sec += T.tv_sec; in operator +=()
165 LIBLOG_ABI_PRIVATE log_time log_time::operator-= (const log_time &T) { in operator -=() argument
[all …]
/system/core/logcat/tests/
Dlogcat_benchmark.cpp57 bool operator< (timestamp &T) in TEST() argument
59 return !ok || !T.ok in TEST()
60 || (month < T.month) in TEST()
61 || ((month == T.month) in TEST()
62 && ((day < T.day) in TEST()
63 || ((day == T.day) in TEST()
64 && ((hour < T.hour) in TEST()
65 || ((hour == T.hour) in TEST()
66 && ((minute < T.minute) in TEST()
67 || ((minute == T.minute) in TEST()
[all …]
/system/tools/aidl/tests/
Dtest_helpers.h31 template <typename T, typename U>
34 android::binder::Status(android::aidl::tests::ITestService::*func)(T, T*), in RepeatPrimitive() argument
36 T reply; in RepeatPrimitive()
46 template <typename T>
50 const std::vector<T>&, std::vector<T>*, std::vector<T>*), in ReverseArray() argument
51 std::vector<T> input) { in ReverseArray()
52 std::vector<T> actual_reversed; in ReverseArray()
53 std::vector<T> actual_repeated; in ReverseArray()
/system/update_engine/common/
Dtest_utils.h211 template<typename T>
214 template<typename T>
215 class ActionTraits<ObjectFeederAction<T>> {
217 typedef T OutputObjectType;
223 template<typename T>
224 class ObjectFeederAction : public Action<ObjectFeederAction<T>> {
227 typedef T OutputObjectType;
238 void set_obj(const T& out_obj) { in set_obj()
242 T out_obj_;
245 template<typename T>
[all …]
/system/tools/aidl/
Dtype_namespace.h139 template<typename T>
147 const T* Find(const AidlType& aidl_type) const;
152 const T* FindTypeByCanonicalName(const std::string& name) const;
172 bool Add(const T* type);
187 std::vector<std::unique_ptr<const T>> types_;
192 template<typename T>
193 bool LanguageTypeNamespace<T>::Add(const T* type) { in Add()
194 const T* existing = FindTypeByCanonicalName(type->CanonicalName()); in Add()
220 template<typename T>
221 const T* LanguageTypeNamespace<T>::Find(const AidlType& aidl_type) const { in Find()
[all …]

123456