Home
last modified time | relevance | path

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

12

/libuv/test/
H A Dtest-poll-oob.c70 int n; in poll_cb() local
79 while (n == -1 && errno == EINTR); in poll_cb()
80 ASSERT(n >= 0 || errno != EINVAL); in poll_cb()
95 ASSERT_EQ(5, n); in poll_cb()
99 ASSERT_EQ(4, n); in poll_cb()
106 if (n > 0) { in poll_cb()
107 ASSERT_EQ(5, n); in poll_cb()
111 } while (n > 0); in poll_cb()
121 ASSERT_EQ(3, n); in poll_cb()
130 } while (n < 0 && errno == EINTR); in poll_cb()
[all …]
H A Dtest-threadpool-cancel.c320 unsigned n; in TEST_IMPL() local
329 n = 0; in TEST_IMPL()
332 ASSERT_OK(uv_fs_close(loop, reqs + n++, 0, fs_cb)); in TEST_IMPL()
333 ASSERT_OK(uv_fs_fchmod(loop, reqs + n++, 0, 0, fs_cb)); in TEST_IMPL()
336 ASSERT_OK(uv_fs_fstat(loop, reqs + n++, 0, fs_cb)); in TEST_IMPL()
337 ASSERT_OK(uv_fs_fsync(loop, reqs + n++, 0, fs_cb)); in TEST_IMPL()
341 ASSERT_OK(uv_fs_lstat(loop, reqs + n++, "/", fs_cb)); in TEST_IMPL()
351 ASSERT_OK(uv_fs_stat(loop, reqs + n++, "/", fs_cb)); in TEST_IMPL()
353 ASSERT_OK(uv_fs_unlink(loop, reqs + n++, "/", fs_cb)); in TEST_IMPL()
356 ASSERT_EQ(n, ARRAY_SIZE(reqs)); in TEST_IMPL()
[all …]
H A Dtest-pipe-set-non-blocking.c34 ssize_t n; in thread_main() local
45 n = req.result; in thread_main()
47 } while (n > 0 || (n == -1 && uv_errno == UV_EINTR)); in thread_main()
49 ASSERT_OK(n); in thread_main()
75 int n; in TEST_IMPL() local
100 n = uv_try_write((uv_stream_t*) &pipe_handle, &buf, 1); in TEST_IMPL()
102 ASSERT_EQ(n, UV_EAGAIN); /* E_NOTIMPL */ in TEST_IMPL()
111 n = buf.len; in TEST_IMPL()
113 ASSERT_EQ(n, sizeof(data)); in TEST_IMPL()
114 nwritten += n; in TEST_IMPL()
H A Drunner-unix.c93 int n; in process_start() local
97 n = 0; in process_start()
103 args[n++] = "valgrind"; in process_start()
104 args[n++] = "--quiet"; in process_start()
110 args[n++] = executable_path; in process_start()
111 args[n++] = name; in process_start()
112 args[n++] = part; in process_start()
113 args[n++] = NULL; in process_start()
196 int n; member
250 args.n = n; in process_wait()
[all …]
H A Dtest-env-vars.c154 size_t n; in TEST_IMPL() local
157 n = i * 32768; in TEST_IMPL()
158 size = n + 1; in TEST_IMPL()
163 memset(p, 'x', n); in TEST_IMPL()
164 p[n] = '\0'; in TEST_IMPL()
168 ASSERT_EQ(n, size); in TEST_IMPL()
170 for (n = 0; n < size; n++) in TEST_IMPL()
171 ASSERT_EQ('x', p[n]); in TEST_IMPL()
H A Dtest-async.c39 int n; in thread_cb() local
44 n = async_cb_called; in thread_cb()
47 if (n == 3) { in thread_cb()
79 int n; in async_cb() local
84 n = ++async_cb_called; in async_cb()
87 if (n == 3) { in async_cb()
H A Dtest-tcp-connect6-error.c85 int n; in TEST_IMPL() local
99 ASSERT_OK(uv_interface_addresses(&ifs, &n)); in TEST_IMPL()
100 for (p = ifs; p < &ifs[n]; p++) in TEST_IMPL()
104 ok = (p < &ifs[n]); in TEST_IMPL()
105 uv_free_interface_addresses(ifs, n); in TEST_IMPL()
H A Dtest-idna.c136 long n; \
140 n = uv__idna_toascii(s, s + sizeof(s) - 1, d1, d1 + sizeof(d1)); \
141 ASSERT_EQ(n, sizeof(expected)); \
142 ASSERT_OK(memcmp(d1, expected, n)); \
144 n = uv__idna_toascii(d1, d1 + strlen(d1), d2, d2 + sizeof(d2)); \
145 ASSERT_EQ(n, sizeof(expected)); \
146 ASSERT_OK(memcmp(d2, expected, n)); \
H A Drunner-win.c179 int process_wait(process_info_t *vec, int n, int timeout) { in process_wait() argument
185 if (n == 0) in process_wait()
188 ASSERT_LE(n, MAXIMUM_WAIT_OBJECTS); in process_wait()
190 for (i = 0; i < n; i++) in process_wait()
199 result = WaitForMultipleObjects(n, handles, TRUE, timeout_api); in process_wait()
201 if (result < WAIT_OBJECT_0 + n) { in process_wait()
/libuv/src/unix/
H A Drandom-getrandom.c55 ssize_t n; in uv__random_getrandom() local
63 for (pos = 0; pos != buflen; pos += n) { in uv__random_getrandom()
65 n = buflen - pos; in uv__random_getrandom()
72 if (n > 256) in uv__random_getrandom()
73 n = 256; in uv__random_getrandom()
75 n = uv__getrandom((char *) buf + pos, n, 0); in uv__random_getrandom()
76 } while (n == -1 && errno == EINTR); in uv__random_getrandom()
78 if (n == -1) in uv__random_getrandom()
81 if (n == 0) in uv__random_getrandom()
H A Dprocfs-exepath.c29 ssize_t n; in uv_exepath() local
34 n = *size - 1; in uv_exepath()
35 if (n > 0) in uv_exepath()
36 n = readlink("/proc/self/exe", buffer, n); in uv_exepath()
38 if (n == -1) in uv_exepath()
41 buffer[n] = '\0'; in uv_exepath()
42 *size = n; in uv_exepath()
H A Drandom-sysctl-linux.c49 size_t n; in uv__random_sysctl() local
60 args.oldlenp = &n; in uv__random_sysctl()
61 n = sizeof(uuid); in uv__random_sysctl()
80 if (n != sizeof(uuid)) in uv__random_sysctl()
90 n = pe - p; in uv__random_sysctl()
91 if (n > 14) in uv__random_sysctl()
92 n = 14; in uv__random_sysctl()
94 memcpy(p, uuid, n); in uv__random_sysctl()
95 p += n; in uv__random_sysctl()
H A Drandom-devurandom.c35 ssize_t n; in uv__random_readpath() local
53 for (pos = 0; pos != buflen; pos += n) { in uv__random_readpath()
55 n = read(fd, (char*) buf + pos, buflen - pos); in uv__random_readpath()
56 while (n == -1 && errno == EINTR); in uv__random_readpath()
58 if (n == -1) { in uv__random_readpath()
63 if (n == 0) { in uv__random_readpath()
H A Dprocess.c257 ssize_t n; in uv__write_int() local
260 n = write(fd, &val, sizeof(val)); in uv__write_int()
261 while (n == -1 && errno == EINTR); in uv__write_int()
282 int n; in uv__process_child_init() local
289 for (n = 1; n < 32; n += 1) { in uv__process_child_init()
290 if (n == SIGKILL || n == SIGSTOP) in uv__process_child_init()
294 if (n == SIGKILLTHR) in uv__process_child_init()
324 if (n) in uv__process_child_init()
325 uv__write_int(error_fd, n); in uv__process_child_init()
350 n = uv__cloexec(use_fd, 0); in uv__process_child_init()
[all …]
H A Dstream.c663 if (n == 1) in uv__writev()
700 len = n < buf->len ? n : buf->len; in uv__write_req_update()
705 n -= len; in uv__write_req_update()
706 } while (n > 0); in uv__write_req_update()
761 ssize_t n; in uv__try_write() local
817 if (n >= 0) in uv__try_write()
818 return n; in uv__try_write()
843 ssize_t n; in uv__write() local
862 n = uv__try_write(stream, in uv__write()
868 if (n >= 0) { in uv__write()
[all …]
H A Dlinux.c1288 uint32_t n; in uv__epoll_ctl_flush() local
1756 int n; in uv_cpu_info() local
1797 if (n != 7) in uv_cpu_info()
1840 p += n + 1; in uv_cpu_info()
1868 n = 0; in uv_cpu_info()
1873 n++; in uv_cpu_info()
1896 *count = n; in uv_cpu_info()
2140 int n; in uv__get_cgroup1_memory_limits() local
2180 int n; in uv__get_cgroup2_memory_limits() local
2223 int n; in uv__get_cgroup1_current_memory() local
[all …]
/libuv/src/
H A Dqueue.h44 static inline void uv__queue_add(struct uv__queue* h, struct uv__queue* n) { in uv__queue_add() argument
45 h->prev->next = n->next; in uv__queue_add()
46 n->next->prev = h->prev; in uv__queue_add()
47 h->prev = n->prev; in uv__queue_add()
53 struct uv__queue* n) { in uv__queue_split() argument
54 n->prev = h->prev; in uv__queue_split()
55 n->prev->next = n; in uv__queue_split()
56 n->next = q; in uv__queue_split()
59 q->prev = n; in uv__queue_split()
64 uv__queue_init(n); in uv__queue_move()
[all …]
H A Dheap-inl.h112 unsigned int n; in HEAP_EXPORT() local
123 for (k = 0, n = 1 + heap->nelts; n >= 2; k += 1, n /= 2) in HEAP_EXPORT()
124 path = (path << 1) | (n & 1); in HEAP_EXPORT()
158 unsigned int n; in HEAP_EXPORT() local
167 for (k = 0, n = heap->nelts; n >= 2; k += 1, n /= 2) in HEAP_EXPORT()
168 path = (path << 1) | (n & 1); in HEAP_EXPORT()
H A Didna.c159 unsigned n; in uv__idna_toascii_label() local
222 n = 128; in uv__idna_toascii_label()
235 if (c >= n) in uv__idna_toascii_label()
240 x = m - n; in uv__idna_toascii_label()
247 n = m; in uv__idna_toascii_label()
254 if (c < n) in uv__idna_toascii_label()
258 if (c != n) in uv__idna_toascii_label()
311 n++; in uv__idna_toascii_label()
H A Dstrscpy.c25 ssize_t uv__strscpy(char* d, const char* s, size_t n) { in uv__strscpy() argument
28 for (i = 0; i < n; i++) in uv__strscpy()
/libuv/docs/code/locks/
H A Dmain.c8 void reader(void *n) in reader() argument
10 int num = *(int *)n; in reader()
22 void writer(void *n) in writer() argument
24 int num = *(int *)n; in writer()
/libuv/src/win/
H A Dsnprintf.c31 int n; in snprintf() local
35 n = _vscprintf(fmt, ap); in snprintf()
39 return n; in snprintf()
/libuv/tools/
H A Dmake_dist_html.py105 def groups_for(groups, n=4): argument
107 groups = groups[:] + [''] * (n - 1)
108 while len(groups) >= n:
110 groups = groups[n:]
/libuv/docs/code/queue-work/
H A Dmain.c18 int n = *(int *) req->data; in fib() local
23 long fib = fib_(n); in fib()
24 fprintf(stderr, "%dth fibonacci is %lu\n", n, fib); in fib()
/libuv/docs/code/queue-cancel/
H A Dmain.c19 int n = *(int *) req->data; in fib() local
24 long fib = fib_(n); in fib()
25 fprintf(stderr, "%dth fibonacci is %lu\n", n, fib); in fib()

Completed in 48 milliseconds

12