Home
last modified time | relevance | path

Searched refs:h (Results 1 – 25 of 214) sorted by relevance

123456789

/system/bt/btif/src/
Dbtif_sock_thread.cc98 static inline void close_cmd_fd(int h);
100 static inline void add_poll(int h, int fd, int type, int flags,
145 static void free_thread_slot(int h) { in free_thread_slot() argument
146 if (0 <= h && h < MAX_THREAD) { in free_thread_slot()
147 close_cmd_fd(h); in free_thread_slot()
148 ts[h].used = 0; in free_thread_slot()
150 APPL_TRACE_ERROR("invalid thread handle:%d", h); in free_thread_slot()
157 int h; in btsock_thread_init() local
158 for (h = 0; h < MAX_THREAD; h++) { in btsock_thread_init()
159 ts[h].cmd_fdr = ts[h].cmd_fdw = -1; in btsock_thread_init()
[all …]
/system/core/fastboot/device/
Dusb.cpp78 static int usb_ffs_write(usb_handle* h, const void* data, int len) { in usb_ffs_write() argument
79 D("about to write (fd=%d, len=%d)", h->bulk_in.get(), len); in usb_ffs_write()
85 int n = write(h->bulk_in, buf, write_len); in usb_ffs_write()
87 D("ERROR: fd = %d, n = %d: %s", h->bulk_in.get(), n, strerror(errno)); in usb_ffs_write()
94 D("[ done fd=%d ]", h->bulk_in.get()); in usb_ffs_write()
98 static int usb_ffs_read(usb_handle* h, void* data, int len, bool allow_partial) { in usb_ffs_read() argument
99 D("about to read (fd=%d, len=%d)", h->bulk_out.get(), len); in usb_ffs_read()
106 int n = read(h->bulk_out, buf, read_len); in usb_ffs_read()
108 D("ERROR: fd = %d, n = %d: %s", h->bulk_out.get(), n, strerror(errno)); in usb_ffs_read()
125 D("[ done fd=%d ]", h->bulk_out.get()); in usb_ffs_read()
[all …]
Dusb_client.cpp189 static void CloseFunctionFs(usb_handle* h) { in CloseFunctionFs() argument
190 h->bulk_in.reset(); in CloseFunctionFs()
191 h->bulk_out.reset(); in CloseFunctionFs()
192 h->control.reset(); in CloseFunctionFs()
195 static bool InitFunctionFs(usb_handle* h) { in InitFunctionFs() argument
198 if (h->control < 0) { // might have already done this before in InitFunctionFs()
200 h->control.reset(open(kUsbFfsFastbootEp0, O_RDWR)); in InitFunctionFs()
201 if (h->control < 0) { in InitFunctionFs()
206 auto ret = write(h->control.get(), &v2_descriptor, sizeof(v2_descriptor)); in InitFunctionFs()
212 ret = write(h->control.get(), &strings, sizeof(strings)); in InitFunctionFs()
[all …]
/system/core/adb/client/
Dusb_dispatch.cpp39 int usb_write(usb_handle* h, const void* data, int len) { in usb_write() argument
41 ? libusb::usb_write(reinterpret_cast<libusb::usb_handle*>(h), data, len) in usb_write()
42 : native::usb_write(reinterpret_cast<native::usb_handle*>(h), data, len); in usb_write()
45 int usb_read(usb_handle* h, void* data, int len) { in usb_read() argument
47 ? libusb::usb_read(reinterpret_cast<libusb::usb_handle*>(h), data, len) in usb_read()
48 : native::usb_read(reinterpret_cast<native::usb_handle*>(h), data, len); in usb_read()
51 int usb_close(usb_handle* h) { in usb_close() argument
52 return should_use_libusb() ? libusb::usb_close(reinterpret_cast<libusb::usb_handle*>(h)) in usb_close()
53 : native::usb_close(reinterpret_cast<native::usb_handle*>(h)); in usb_close()
56 void usb_reset(usb_handle* h) { in usb_reset() argument
[all …]
Dusb_linux.cpp305 static int usb_bulk_write(usb_handle* h, const void* data, int len) { in usb_bulk_write() argument
306 std::unique_lock<std::mutex> lock(h->mutex); in usb_bulk_write()
309 usbdevfs_urb* urb = &h->urb_out; in usb_bulk_write()
312 urb->endpoint = h->ep_out; in usb_bulk_write()
317 if (h->dead) { in usb_bulk_write()
322 if (TEMP_FAILURE_RETRY(ioctl(h->fd, USBDEVFS_SUBMITURB, urb)) == -1) { in usb_bulk_write()
326 h->urb_out_busy = true; in usb_bulk_write()
329 if (h->cv.wait_until(lock, now + 5s) == std::cv_status::timeout || h->dead) { in usb_bulk_write()
334 if (!h->urb_out_busy) { in usb_bulk_write()
344 static int usb_bulk_read(usb_handle* h, void* data, int len) { in usb_bulk_read() argument
[all …]
Dtransport_usb.cpp44 static int UsbReadMessage(usb_handle* h, amessage* msg) { in UsbReadMessage() argument
48 size_t usb_packet_size = usb_get_max_packet_size(h); in UsbReadMessage()
53 int n = usb_read(h, buffer, usb_packet_size); in UsbReadMessage()
61 return usb_read(h, msg, sizeof(*msg)); in UsbReadMessage()
67 static int UsbReadPayload(usb_handle* h, apacket* p) { in UsbReadPayload() argument
75 size_t usb_packet_size = usb_get_max_packet_size(h); in UsbReadPayload()
87 int rc = usb_read(h, &p->payload[0], p->payload.size()); in UsbReadPayload()
96 return usb_read(h, &p->payload[0], p->payload.size()); in UsbReadPayload()
193 void init_usb_transport(atransport* t, usb_handle* h) { in init_usb_transport() argument
195 auto connection = std::make_unique<UsbConnection>(h); in init_usb_transport()
[all …]
Dusb.h29 int usb_write(handle_ref_type h, const void* data, int len); \
30 int usb_read(handle_ref_type h, void* data, int len); \
31 int usb_close(handle_ref_type h); \
32 void usb_reset(handle_ref_type h); \
33 void usb_kick(handle_ref_type h); \
Dusb_libusb.cpp56 void operator()(libusb_device_handle* h) { in operator ()()
57 libusb_close(h); in operator ()()
535 static int perform_usb_transfer(usb_handle* h, transfer_info* info, in perform_usb_transfer() argument
564 int usb_write(usb_handle* h, const void* d, int len) { in usb_write() argument
567 std::unique_lock<std::mutex> lock(h->device_handle_mutex); in usb_write()
568 if (!h->device_handle) { in usb_write()
573 transfer_info* info = &h->write; in usb_write()
574 info->transfer->dev_handle = h->device_handle; in usb_write()
576 info->transfer->endpoint = h->bulk_out; in usb_write()
582 int rc = perform_usb_transfer(h, info, std::move(lock)); in usb_write()
[all …]
/system/core/libcutils/
Dnative_handle.cpp46 native_handle_t* h = static_cast<native_handle_t*>(malloc(mallocSize)); in native_handle_create() local
47 if (h) { in native_handle_create()
48 h->version = sizeof(native_handle_t); in native_handle_create()
49 h->numFds = numFds; in native_handle_create()
50 h->numInts = numInts; in native_handle_create()
52 return h; in native_handle_create()
75 int native_handle_delete(native_handle_t* h) { in native_handle_delete() argument
76 if (h) { in native_handle_delete()
77 if (h->version != sizeof(native_handle_t)) return -EINVAL; in native_handle_delete()
78 free(h); in native_handle_delete()
[all …]
Dhashmap.cpp84 int h = map->hash(key); in hashKey() local
88 h += ~(h << 9); in hashKey()
89 h ^= (((unsigned int) h) >> 14); in hashKey()
90 h += (h << 4); in hashKey()
91 h ^= (((unsigned int) h) >> 10); in hashKey()
93 return h; in hashKey()
159 int h = keySize; in hashmapHash() local
163 h = h * 31 + *data; in hashmapHash()
166 return h; in hashmapHash()
/system/tools/hidl/c2hal/test/
DAndroid.bp29 "simple.h",
32 "android/hardware/c2hal_test/1.0/BnHwSimple.h",
33 "android/hardware/c2hal_test/1.0/BpHwSimple.h",
34 "android/hardware/c2hal_test/1.0/BsSimple.h",
35 "android/hardware/c2hal_test/1.0/IHwSimple.h",
36 "android/hardware/c2hal_test/1.0/ISimple.h",
37 "android/hardware/c2hal_test/1.0/BnHwSimpleLocation.h",
38 "android/hardware/c2hal_test/1.0/BpHwSimpleLocation.h",
39 "android/hardware/c2hal_test/1.0/BsSimpleLocation.h",
40 "android/hardware/c2hal_test/1.0/IHwSimpleLocation.h",
[all …]
/system/core/deprecated-adf/libadf/tests/
Dadf_test.cpp85 void getCurrentMode(uint32_t &w, uint32_t &h) { in getCurrentMode() argument
89 h = data.current_mode.vdisplay; in getCurrentMode()
127 void drawCheckerboard(uint32_t &w, uint32_t &h, uint32_t &format, in drawCheckerboard() argument
130 ASSERT_NO_FATAL_FAILURE(getCurrentMode(w, h)); in drawCheckerboard()
133 buf_fd = adf_interface_simple_buffer_alloc(intf, w, h, format, &offset, in drawCheckerboard()
135 ASSERT_GE(buf_fd, 0) << "allocating " << w << "x" << h << " " << in drawCheckerboard()
139 void *mapped = mmap(NULL, pitch * h, PROT_WRITE, MAP_SHARED, buf_fd, in drawCheckerboard()
141 ASSERT_NE(mapped, MAP_FAILED) << "mapping " << w << "x" << h << " " << in drawCheckerboard()
145 for (uint32_t y = 0; y < h / 2; y++) { in drawCheckerboard()
152 for (uint32_t y = h / 2; y < h; y++) { in drawCheckerboard()
[all …]
/system/core/adb/daemon/
Dframebuffer_service.cpp65 int w, h, f, c; in framebuffer_service() local
89 if(!ReadFdExactly(fd_screencap, &h, 4)) goto done; in framebuffer_service()
99 fbinfo.size = w * h * 4; in framebuffer_service()
101 fbinfo.height = h; in framebuffer_service()
113 fbinfo.size = w * h * 4; in framebuffer_service()
115 fbinfo.height = h; in framebuffer_service()
127 fbinfo.size = w * h * 3; in framebuffer_service()
129 fbinfo.height = h; in framebuffer_service()
141 fbinfo.size = w * h * 2; in framebuffer_service()
143 fbinfo.height = h; in framebuffer_service()
[all …]
/system/bt/gd/dumpsys/
DAndroid.bp33 "root_generated.h",
34 "bar_generated.h",
35 "baz_generated.h",
36 "foo_generated.h",
37 "qux_generated.h",
73 "dumpsys_module_schema_data.h",
87 "generated_dumpsys_bundled_schema.h",
101 "generated_dumpsys_bundled_test_schema.h",
115 "bluetooth_flatbuffer_test_generated.h", "bluetooth_flatbuffer_test.bfbs",
/system/tools/hidl/
Dhidl-gen_l.ll32 #include "Annotation.h"
33 #include "AST.h"
34 #include "ArrayType.h"
35 #include "CompoundType.h"
36 #include "ConstantExpression.h"
37 #include "DeathRecipientType.h"
38 #include "DocComment.h"
39 #include "EnumType.h"
40 #include "HandleType.h"
41 #include "MemoryType.h"
[all …]
/system/memory/lmkd/
DAndroid.bp59 name: "statslog_lmkd.h",
61 …cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_lmkd.h --module lmkd --namespace a…
63 "statslog_lmkd.h",
70 …ir)/statslog_lmkd.cpp --module lmkd --namespace android,lmkd,stats --importHeader statslog_lmkd.h",
79 generated_headers: ["statslog_lmkd.h"],
80 export_generated_headers: ["statslog_lmkd.h"],
/system/tools/hidl/test/cpp_impl_test/
DAndroid.bp14 "FooCallback.h",
15 "Foo.h",
16 "MyTypes.h",
17 "Simple.h",
18 "TheirTypes.h",
19 "Vendor.h",
/system/bt/gd/dumpsys/internal/test_data/
Dmkfiles2 xxd -i string.bfbs > string_bfbs.h
4 xxd -i integer.bfbs > integer_bfbs.h
6 xxd -i float.bfbs > float_bfbs.h
8 xxd -i struct.bfbs > struct_bfbs.h
/system/core/libpixelflinger/
Dclear.cpp51 uint32_t l, uint32_t t, uint32_t w, uint32_t h) in memset2d() argument
60 w *= h; in memset2d()
61 h = 1; in memset2d()
69 } while(--h); in memset2d()
75 } while(--h); in memset2d()
83 } while(--h); in memset2d()
102 uint32_t h = c->state.scissor.bottom - t; in ggl_clear() local
104 if (!w || !h) in ggl_clear()
131 memset2d(c, c->state.buffers.color, packed, l, t, w, h); in ggl_clear()
140 memset2d(c, c->state.buffers.depth, packed, l, t, w, h); in ggl_clear()
/system/bt/gd/
DAndroid.bp92 "--header-filter=^.*system/bt/.*.h$",
442 "hci/hci_packets.h",
443 "l2cap/l2cap_packets.h",
444 "security/smp_packets.h",
476 "dumpsys_data_generated.h",
477 "dumpsys_generated.h",
561 "facade/common.grpc.pb.h",
562 "facade/common.pb.h",
563 "facade/rootservice.grpc.pb.h",
564 "facade/rootservice.pb.h",
[all …]
/system/teeui/libteeui/src/
Dbutton.cpp42 for (int y = 0; y < box.h().count(); ++y) { in draw()
67 bottom * (intBounds.h() - intRadius))); in draw()
73 for (int y = 0; y < cBounds.h().count(); ++y) { in draw()
107 if (auto error = drawBox(Box<intpxs>(0, intBounds.h() - intRadius, intRadius, intRadius) in draw()
117 if (auto error = drawBox(Box<intpxs>(intBounds.w() - intRadius, intBounds.h() - intRadius, in draw()
126 intBounds.h() - intRadius - intRadius) in draw()
132 drawBox(Box<intpxs>(0, intRadius, intRadius, intBounds.h() - intRadius - intRadius) in draw()
144 intBounds.h() - intRadius - intRadius) in draw()
149 if (auto error = drawBox(Box<intpxs>(intRadius, intBounds.h() - intRadius, in draw()
163 auto start = PxPoint{bounds.w() - coBBox.w(), bounds.h() - coBBox.h()} / pxs(2.0); in draw()
[all …]
/system/core/fastboot/
Dbootimg_utils.cpp37 static void bootimg_set_cmdline_v3(boot_img_hdr_v3* h, const std::string& cmdline) { in bootimg_set_cmdline_v3() argument
38 if (cmdline.size() >= sizeof(h->cmdline)) die("command line too large: %zu", cmdline.size()); in bootimg_set_cmdline_v3()
39 strcpy(reinterpret_cast<char*>(h->cmdline), cmdline.c_str()); in bootimg_set_cmdline_v3()
42 void bootimg_set_cmdline(boot_img_hdr_v2* h, const std::string& cmdline) { in bootimg_set_cmdline() argument
43 if (h->header_version == 3) { in bootimg_set_cmdline()
44 return bootimg_set_cmdline_v3(reinterpret_cast<boot_img_hdr_v3*>(h), cmdline); in bootimg_set_cmdline()
46 if (cmdline.size() >= sizeof(h->cmdline)) die("command line too large: %zu", cmdline.size()); in bootimg_set_cmdline()
47 strcpy(reinterpret_cast<char*>(h->cmdline), cmdline.c_str()); in bootimg_set_cmdline()
/system/apex/apexd/
Dapexd_verity.cpp43 uint8_t HexToBin(char h) { in HexToBin() argument
44 if (h >= 'A' && h <= 'H') return h - 'A' + 10; in HexToBin()
45 if (h >= 'a' && h <= 'h') return h - 'a' + 10; in HexToBin()
46 return h - '0'; in HexToBin()
/system/bt/gd/docs/testing/
Dgtest.md126 …l/fixed_channel_impl.h](https://android.googlesource.com/platform/system/bt/+/master/gd/l2cap/clas…
131 #include "common/bidi_queue.h"
132 #include "l2cap/cid.h"
133 #include "l2cap/classic/fixed_channel.h"
134 #include "l2cap/internal/channel_impl.h"
135 #include "l2cap/l2cap_packets.h"
136 #include "os/handler.h"
137 #include "os/log.h"
175 …_channel_impl_mock.h](https://android.googlesource.com/platform/system/bt/+/master/gd/l2cap/classi…
180 #include "l2cap/classic/internal/fixed_channel_impl.h"
[all …]
/system/extras/tests/framebuffer/
Dfb_test.c207 void draw_grid(int w, int h, void* _loc) { in draw_grid() argument
213 for (j = 0; j < h/2; j++) { in draw_grid()
226 for (; j < h; j++) { in draw_grid()
241 void clear_screen(int w, int h, void* _loc) in clear_screen() argument
248 for (j = 0; j < h; j++) in clear_screen()
258 int h; in main() local
272 h = atoi(argv[3]); in main()
275 h = vi.yres; in main()
281 draw_grid(w, h, gr_fbs[id].data); in main()

123456789