/system/core/include/utils/ |
D | BitSet.h | 37 static inline uint32_t valueForBit(uint32_t n) { return 0x80000000UL >> n; } in valueForBit() 60 inline bool hasBit(uint32_t n) const { return hasBit(value, n); } in hasBit() 62 static inline bool hasBit(uint32_t value, uint32_t n) { return value & valueForBit(n); } in hasBit() 65 inline void markBit(uint32_t n) { markBit(value, n); } in markBit() 67 static inline void markBit (uint32_t& value, uint32_t n) { value |= valueForBit(n); } in markBit() 70 inline void clearBit(uint32_t n) { clearBit(value, n); } in clearBit() 72 static inline void clearBit(uint32_t& value, uint32_t n) { value &= ~ valueForBit(n); } in clearBit() 97 uint32_t n = firstMarkedBit(value); in clearFirstMarkedBit() local 98 clearBit(value, n); in clearFirstMarkedBit() 99 return n; in clearFirstMarkedBit() [all …]
|
D | TypeHelpers.h | 132 void construct_type(TYPE* p, size_t n) { 134 while (n--) { 141 void destroy_type(TYPE* p, size_t n) { 143 while (n--) { 151 void copy_type(TYPE* d, const TYPE* s, size_t n) { 153 while (n--) { 158 memcpy(d,s,n*sizeof(TYPE)); 163 void splat_type(TYPE* where, const TYPE* what, size_t n) { 165 while (n--) { 170 while (n--) { [all …]
|
/system/core/libpixelflinger/ |
D | fixed.cpp | 73 GGLfixed gglFastDivx(GGLfixed n, GGLfixed d) in gglFastDivx() argument 76 n >>= 8; in gglFastDivx() 79 return gglMulx(n, gglRecip(d)); in gglFastDivx() 174 int32_t gglDivQ(GGLfixed n, GGLfixed d, int32_t i) in gglDivQ() argument 177 const int32_t ds = n^d; in gglDivQ() 178 if (n<0) n = -n; in gglDivQ() 180 int nd = gglClz(d) - gglClz(n); in gglDivQ() 183 else n <<= -nd; in gglDivQ() 193 n -= d; in gglDivQ() 196 if (n>=0) q |= 128; in gglDivQ() [all …]
|
D | picker.cpp | 43 new_needs.n &= ~GGL_NEEDS_CB_FORMAT_MASK; in ggl_pick() 44 new_needs.n |= GGL_BUILD_NEEDS(c->state.buffers.color.format, CB_FORMAT); in ggl_pick() 50 uint32_t n = GGL_BUILD_NEEDS(c->state.buffers.color.format, CB_FORMAT); in ggl_pick() local 82 n |= GGL_BUILD_NEEDS( src, BLEND_SRC ); in ggl_pick() 83 n |= GGL_BUILD_NEEDS( dst, BLEND_DST ); in ggl_pick() 85 n |= GGL_BUILD_NEEDS( src_alpha, BLEND_SRCA ); in ggl_pick() 86 n |= GGL_BUILD_NEEDS( dst_alpha, BLEND_DSTA ); in ggl_pick() 88 n |= GGL_BUILD_NEEDS( src, BLEND_SRCA ); in ggl_pick() 89 n |= GGL_BUILD_NEEDS( dst, BLEND_DSTA ); in ggl_pick() 92 n |= GGL_BUILD_NEEDS( GGL_ONE, BLEND_SRC ); in ggl_pick() [all …]
|
/system/core/libutils/ |
D | primes.py | 27 def is_odd_prime(n): argument 28 limit = (n - 1) / 2 31 if n % d == 0: 38 n = 5 variable 40 while n < max: 41 print " %d," % (n) 42 n = n * 2 + 1 variable 43 while not is_odd_prime(n): 44 n += 2
|
D | StopWatch.cpp | 47 const int n = mNumLaps; in ~StopWatch() local 49 for (int i=0 ; i<n ; i++) { in ~StopWatch() 67 const int n = mNumLaps; in lap() local 68 mLaps[n].soFar = elapsed; in lap() 69 mLaps[n].thisLap = n ? (elapsed - mLaps[n-1].soFar) : elapsed; in lap() 70 mNumLaps = n+1; in lap()
|
/system/core/gpttool/ |
D | gpttool.c | 121 unsigned n; in add_ptn() local 132 for (n = 0; n < EFI_ENTRIES; n++, entry++) { in add_ptn() 139 for (n = 0; (n < EFI_NAMELEN) && *name; n++) in add_ptn() 140 entry->name[n] = *name++; in add_ptn() 162 unsigned n, m; in show() local 168 for (n = 0; n < EFI_ENTRIES; n++, entry++) { in show() 176 n + 1, entry->first_lba, entry->last_lba, name); in show() 183 unsigned n; in find_next_lba() local 185 for (n = 0; n < EFI_ENTRIES; n++, entry++) { in find_next_lba() 197 u64 n = strtoull(sz, 0, 10); in parse_size() local [all …]
|
/system/core/toolbox/upstream-netbsd/lib/libc/gen/ |
D | getbsize.c | 57 long n, max, mul, blocksize; in __weak_alias() local 67 if ((n = strtol(p, &ep, 10)) < 0) in __weak_alias() 69 if (n == 0) in __weak_alias() 70 n = 1; in __weak_alias() 95 n = 512; in __weak_alias() 100 if (n > max) { in __weak_alias() 102 n = max; in __weak_alias() 104 if ((blocksize = n * mul) < 512) { in __weak_alias() 107 blocksize = n = 512; in __weak_alias() 110 blocksize = n = 512; in __weak_alias() [all …]
|
/system/media/audio_utils/ |
D | fixedfft.cpp | 111 void fixed_fft(int n, int32_t *v) in fixed_fft() argument 115 for (r = 0, i = 1; i < n; ++i) { in fixed_fft() 116 for (p = n; !(p & r); p >>= 1, r ^= p); in fixed_fft() 124 for (p = 1; p < n; p <<= 1) { in fixed_fft() 127 for (i = 0; i < n; i += p << 1) { in fixed_fft() 138 for (i = r; i < n; i += p << 1) { in fixed_fft() 148 void fixed_fft_real(int n, int32_t *v) in fixed_fft_real() argument 150 int scale = LOG_FFT_SIZE, m = n >> 1, i; in fixed_fft_real() 152 fixed_fft(n, v); in fixed_fft_real() 153 for (i = 1; i <= n; i <<= 1, --scale); in fixed_fft_real() [all …]
|
/system/core/init/ |
D | util.c | 51 unsigned int n; in android_name_to_id() local 53 for (n = 0; n < android_id_count; n++) { in android_name_to_id() 54 if (!strcmp(info[n].name, name)) in android_name_to_id() 55 return info[n].aid; in android_name_to_id() 252 int n; in mtd_name_to_number() local 257 for (n = 0; n < mtd_part_count; n++) { in mtd_name_to_number() 258 if (!strcmp(name, mtd_part_map[n].name)) { in mtd_name_to_number() 259 return mtd_part_map[n].number; in mtd_name_to_number() 412 int fd, n; in get_hardware_name() local 430 n = read(fd, data + len, limit - len); in get_hardware_name() [all …]
|
D | parser.c | 19 int n; in DUMP() 26 for (n = 0; n < svc->nargs; n++) { in DUMP() 27 RAW(" '%s'", svc->args[n]); in DUMP() 41 for (n = 0; n < cmd->nargs; n++) { in DUMP() 42 RAW(" %s", cmd->args[n]); in DUMP()
|
/system/extras/tests/bionic/libc/other/ |
D | test_vfprintf_leak.c | 40 int n; in main() local 42 for (n = 0; n < 10000; n++) in main() 43 snprintf( temp, sizeof(temp), "%g", n*0.647287623 ); in main()
|
/system/core/toolbox/ |
D | dmesg.c | 16 int n, op, klog_buf_len; in dmesg_main() local 39 n = klogctl(op, buffer, klog_buf_len); in dmesg_main() 40 if (n < 0) { in dmesg_main() 44 buffer[n] = '\0'; in dmesg_main() 46 while((ret = write(STDOUT_FILENO, p, n))) { in dmesg_main() 54 n -= ret; in dmesg_main()
|
D | df.c | 9 static void printsize(long long n) in printsize() argument 14 n *= 10; in printsize() 16 if (n > 1024*1024*10) { in printsize() 17 n /= 1024; in printsize() 21 if (n > 1024*1024*10) { in printsize() 22 n /= 1024; in printsize() 26 t = (n + 512) / 1024; in printsize()
|
D | id.c | 33 int n, max; in id_main() local 46 for(n = 1; n < max; n++) { in id_main() 48 print_gid(list[n]); in id_main()
|
/system/extras/tests/uevents/ |
D | uevents.c | 26 int n; in main() local 33 while ((n = uevent_kernel_multicast_recv(device_fd, msg, UEVENT_MSG_LEN)) > 0) { in main() 34 msg[n] = '\0'; in main() 35 msg[n+1] = '\0'; in main() 37 for (i = 0; i < n; i++) in main()
|
/system/core/fastbootd/ |
D | utils.c | 117 int n; in strip() local 119 n = strspn(str, " \t"); in strip() 120 str += n; in strip() 121 n = strcspn(str, " \t"); in strip() 122 str[n] = '\0'; in strip() 187 size_t n = 0; in bulk_read() local 189 while (n < length) { in bulk_read() 190 size_t to_read = (length - n > READ_BUF_SIZE) ? READ_BUF_SIZE : length - n; in bulk_read() 191 ret = TEMP_FAILURE_RETRY(read(bulk_out, buf + n, to_read)); in bulk_read() 197 n += ret; in bulk_read() [all …]
|
D | socket_client.c | 48 int n; in run_socket_client() local 72 if ((n = read(STDIN_FD, buffer, BUFFER_SIZE)) < 0) { in run_socket_client() 76 if (bulk_write(fd, buffer, n) < 0) { in run_socket_client() 82 if ((n = read(fd, buffer, BUFFER_SIZE)) < 0) { in run_socket_client() 86 if (bulk_write(STDOUT_FD, buffer, n) < 0) { in run_socket_client()
|
/system/core/fastboot/ |
D | usb_linux.c | 246 int fd, n; in read_sysfs_string() local 256 n = read(fd, buf, bufsize - 1); in read_sysfs_string() 259 if (n < 0) in read_sysfs_string() 262 buf[n] = '\0'; in read_sysfs_string() 264 return n; in read_sysfs_string() 306 int n, in, out, ifc; in find_usb_device() local 332 n = read(fd, desc, sizeof(desc)); in find_usb_device() 334 if(filter_usb_device(de->d_name, desc, n, writable, callback, in find_usb_device() 342 n = ioctl(fd, USBDEVFS_CLAIMINTERFACE, &ifc); in find_usb_device() 343 if(n != 0) { in find_usb_device() [all …]
|
/system/core/libmincrypt/test/ |
D | ecdsa_test.c | 240 #define CHECK_GOOD_DSA_SIG(n) do {\ in main() argument 241 CHECK_DSA_SIG(good_dsa_signature_##n, 1); \ in main() 242 int result = !memcmp(P256_DIGITS(&good_dsa_signature_##n##_r), P256_DIGITS(&r), \ in main() 246 result = !memcmp(P256_DIGITS(&good_dsa_signature_##n##_s), P256_DIGITS(&s), \ in main() 251 #define CHECK_BAD_DSA_SIG(n) \ in main() argument 252 CHECK_DSA_SIG(bad_dsa_signature_##n, 0) in main() 265 #define TEST_MESSAGE(n) do {\ in main() argument 266 message = parsehex(message_##n, &mlen); \ in main() 269 signature = parsehex(signature_##n, &slen); \ in main() 272 printf("message %d: %s\n", n, result ? "verified" : "not verified"); \ in main()
|
/system/core/libcutils/ |
D | debugger.c | 140 ssize_t n; in dump_backtrace_to_file_timeout() local 141 while ((n = TEMP_FAILURE_RETRY(read(sock_fd, buffer, sizeof(buffer)))) > 0) { in dump_backtrace_to_file_timeout() 142 if (TEMP_FAILURE_RETRY(write(fd, buffer, n)) != n) { in dump_backtrace_to_file_timeout() 164 ssize_t n = TEMP_FAILURE_RETRY(read(sock_fd, buffer, sizeof(buffer) - 1)); in dump_tombstone_timeout() local 165 if (n <= 0) { in dump_tombstone_timeout() 169 if (n >= (ssize_t) pathlen) { in dump_tombstone_timeout() 170 n = pathlen - 1; in dump_tombstone_timeout() 172 buffer[n] = '\0'; in dump_tombstone_timeout() 173 memcpy(pathbuf, buffer, n + 1); in dump_tombstone_timeout()
|
D | memory.c | 71 size_t n = siz; in strlcpy() local 74 if (n != 0) { in strlcpy() 75 while (--n != 0) { in strlcpy() 82 if (n == 0) { in strlcpy()
|
/system/core/logd/ |
D | LogListener.cpp | 56 ssize_t n = recvmsg(socket, &hdr, 0); in onDataAvailable() local 57 if (n <= (ssize_t)(sizeof_log_id_t + sizeof(uint16_t) + sizeof(log_time))) { in onDataAvailable() 90 n -= sizeof_log_id_t; in onDataAvailable() 95 n -= sizeof(uint16_t); in onDataAvailable() 100 n -= sizeof(log_time); in onDataAvailable() 106 ((size_t) n <= USHRT_MAX) ? (unsigned short) n : USHRT_MAX); in onDataAvailable()
|
/system/core/libpixelflinger/tests/codegen/ |
D | codegen.cpp | 39 static void ggl_test_codegen(uint32_t n, uint32_t p, uint32_t t0, uint32_t t1) in ggl_test_codegen() argument 45 needs.n = n; in ggl_test_codegen() 79 uint32_t n; in main() local 83 sscanf(argv[1], "%08x:%08x_%08x_%08x", &p, &n, &t0, &t1); in main() 84 ggl_test_codegen(n, p, t0, t1); in main()
|
/system/core/healthd/ |
D | healthd.cpp | 213 int n; in uevent_event() local 215 n = uevent_kernel_multicast_recv(uevent_fd, msg, UEVENT_MSG_LEN); in uevent_event() 216 if (n <= 0) in uevent_event() 218 if (n >= UEVENT_MSG_LEN) /* overflow -- discard */ in uevent_event() 221 msg[n] = '\0'; in uevent_event() 222 msg[n+1] = '\0'; in uevent_event() 295 for (int n = 0; n < nevents; ++n) { in healthd_mainloop() local 296 if (events[n].data.ptr) in healthd_mainloop() 297 (*(void (*)(int))events[n].data.ptr)(events[n].events); in healthd_mainloop()
|