Home
last modified time | relevance | path

Searched refs:n (Results 1 – 25 of 148) sorted by relevance

123456

/system/core/include/utils/
DBitSet.h37 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 …]
DTypeHelpers.h132 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/
Dfixed.cpp73 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 …]
Dpicker.cpp43 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/
Dprimes.py27 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
DStopWatch.cpp47 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/
Dgpttool.c121 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/bt/osi/src/
Dcompat.c71 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()
106 size_t n = siz; in strlcat() local
110 while (n-- != 0 && *d != '\0') in strlcat()
113 n = siz - dlen; in strlcat()
115 if (n == 0) in strlcat()
119 if (n != 1) { in strlcat()
121 n--; in strlcat()
/system/core/toolbox/upstream-netbsd/lib/libc/gen/
Dgetbsize.c57 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/core/base/
Dfile.cpp38 ssize_t n; in ReadFdToString() local
39 while ((n = TEMP_FAILURE_RETRY(read(fd, &buf[0], sizeof(buf)))) > 0) { in ReadFdToString()
40 content->append(buf, n); in ReadFdToString()
42 return (n == 0) ? true : false; in ReadFdToString()
62 ssize_t n = TEMP_FAILURE_RETRY(write(fd, p, left)); in WriteStringToFd() local
63 if (n == -1) { in WriteStringToFd()
66 p += n; in WriteStringToFd()
67 left -= n; in WriteStringToFd()
127 ssize_t n = TEMP_FAILURE_RETRY(read(fd, p, remaining)); in ReadFully() local
128 if (n <= 0) return false; in ReadFully()
[all …]
/system/media/audio_utils/
Dfixedfft.cpp111 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/libpixelflinger/codeflinger/tinyutils/
DTypeHelpers.h119 void construct_type(TYPE* p, size_t n) {
121 while (n--) {
128 void destroy_type(TYPE* p, size_t n) {
130 while (n--) {
138 void copy_type(TYPE* d, const TYPE* s, size_t n) {
140 while (n--) {
145 memcpy(d,s,n*sizeof(TYPE));
150 void assign_type(TYPE* d, const TYPE* s, size_t n) {
152 while (n--) {
156 memcpy(d,s,n*sizeof(TYPE));
[all …]
/system/core/libcutils/
Ddebugger.c91 ssize_t n; in dump_backtrace_to_file_timeout() local
92 while ((n = TEMP_FAILURE_RETRY(read(sock_fd, buffer, sizeof(buffer)))) > 0) { in dump_backtrace_to_file_timeout()
93 if (TEMP_FAILURE_RETRY(write(fd, buffer, n)) != n) { in dump_backtrace_to_file_timeout()
115 ssize_t n = TEMP_FAILURE_RETRY(read(sock_fd, buffer, sizeof(buffer) - 1)); in dump_tombstone_timeout() local
116 if (n <= 0) { in dump_tombstone_timeout()
120 if (n >= (ssize_t) pathlen) { in dump_tombstone_timeout()
121 n = pathlen - 1; in dump_tombstone_timeout()
123 buffer[n] = '\0'; in dump_tombstone_timeout()
124 memcpy(pathbuf, buffer, n + 1); in dump_tombstone_timeout()
Dstrlcpy.c37 size_t n = siz; in strlcpy() local
40 if (n != 0) { in strlcpy()
41 while (--n != 0) { in strlcpy()
48 if (n == 0) { in strlcpy()
/system/core/fastboot/
Dusb_linux.c253 int fd, n; in read_sysfs_string() local
263 n = read(fd, buf, bufsize - 1); in read_sysfs_string()
266 if (n < 0) in read_sysfs_string()
269 buf[n] = '\0'; in read_sysfs_string()
271 return n; in read_sysfs_string()
313 int n, in, out, ifc; in find_usb_device() local
339 n = read(fd, desc, sizeof(desc)); in find_usb_device()
341 if(filter_usb_device(de->d_name, desc, n, writable, callback, in find_usb_device()
349 n = ioctl(fd, USBDEVFS_CLAIMINTERFACE, &ifc); in find_usb_device()
350 if(n != 0) { in find_usb_device()
[all …]
/system/extras/perfprofd/quipper/base/
Dcompiler_specific.h25 #define MSVC_SUPPRESS_WARNING(n) __pragma(warning(suppress:n)) argument
29 #define MSVC_PUSH_DISABLE_WARNING(n) __pragma(warning(push)) \ argument
30 __pragma(warning(disable:n))
35 #define MSVC_PUSH_WARNING_LEVEL(n) __pragma(warning(push, n)) argument
60 #define MSVC_SUPPRESS_WARNING(n) argument
61 #define MSVC_PUSH_DISABLE_WARNING(n) argument
62 #define MSVC_PUSH_WARNING_LEVEL(n) argument
/system/core/toolbox/
Ddf.c9 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()
/system/extras/tests/uevents/
Duevents.c26 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/libmincrypt/test/
Decdsa_test.c240 #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/bt/embdrv/sbc/decoder/include/
Doi_time.h69 #define OI_SECONDS(n) ((OI_INTERVAL) ((n) * OI_INTERVALS_PER_SECOND)) argument
75 #define OI_MSECONDS(n) ((OI_INTERVAL) ((n + MSECS_PER_OI_INTERVAL - 1) / MSECS_PER_OI_INTERVAL)) argument
81 #define OI_MINUTES(n) ((OI_INTERVAL) ((n) * OI_SECONDS(60))) argument
/system/core/init/
Dutil.cpp54 unsigned int n; in android_name_to_id() local
56 for (n = 0; n < android_id_count; n++) { in android_name_to_id()
57 if (!strcmp(info[n].name, name)) in android_name_to_id()
58 return info[n].aid; in android_name_to_id()
250 int n; in mtd_name_to_number() local
255 for (n = 0; n < mtd_part_count; n++) { in mtd_name_to_number()
256 if (!strcmp(name, mtd_part_map[n].name)) { in mtd_name_to_number()
257 return mtd_part_map[n].number; in mtd_name_to_number()
412 int n = read(fd, cmdline, sizeof(cmdline) - 1); in import_kernel_cmdline() local
413 if (n < 0) n = 0; in import_kernel_cmdline()
[all …]
/system/core/healthd/
Dhealthd.cpp213 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()
/system/core/libpixelflinger/tests/codegen/
Dcodegen.cpp41 static void ggl_test_codegen(uint32_t n, uint32_t p, uint32_t t0, uint32_t t1) in ggl_test_codegen() argument
47 needs.n = n; in ggl_test_codegen()
81 uint32_t n; in main() local
85 sscanf(argv[1], "%08x:%08x_%08x_%08x", &p, &n, &t0, &t1); in main()
86 ggl_test_codegen(n, p, t0, t1); in main()
/system/extras/verity/
Dgenerate_verity_key.c53 BIGNUM* n = BN_new(); in convert_to_mincrypt_format() local
57 BN_copy(n, rsa->n); in convert_to_mincrypt_format()
59 BN_mod_sqr(rr, r, n, ctx); in convert_to_mincrypt_format()
60 BN_div(NULL, rem, n, r32, ctx); in convert_to_mincrypt_format()
68 BN_div(n, rem, n, r32, ctx); in convert_to_mincrypt_format()
69 pkey->n[i] = BN_get_word(rem); in convert_to_mincrypt_format()
76 BN_free(n); in convert_to_mincrypt_format()
/system/core/logd/
DLogStatistics.h42 std::unique_ptr<const TEntry *[]> sort(size_t n) { in sort() argument
43 if (!n) { in sort()
48 const TEntry **retval = new const TEntry* [n]; in sort()
49 memset(retval, 0, sizeof(*retval) * n); in sort()
54 ssize_t i = n - 1; in sort()
57 if (++i < (ssize_t)n) { in sort()
58 size_t b = n - i - 1; in sort()
70 static ssize_t next(ssize_t index, std::unique_ptr<const TEntry *[]> &sorted, size_t n) { in next() argument
72 if (!sorted.get() || (index < 0) || (n <= (size_t)index) || !sorted[index] in next()
196 char *n = android::pidToName(p); in add() local
[all …]

123456