Lines Matching refs:len

117 STATIC_ASSERT(sizeof(((uv_buf_t*) 0)->len) ==
120 STATIC_ASSERT(offsetof(uv_buf_t, len) == offsetof(struct iovec, iov_len));
241 socklen_t len; in uv__socket_sockopt() local
253 len = sizeof(*value); in uv__socket_sockopt()
256 r = getsockopt(fd, SOL_SOCKET, optname, value, &len); in uv__socket_sockopt()
258 r = setsockopt(fd, SOL_SOCKET, optname, (const void*) value, len); in uv__socket_sockopt()
868 static void maybe_resize(uv_loop_t* loop, unsigned int len) { in maybe_resize() argument
875 if (len <= loop->nwatchers) in maybe_resize()
887 nwatchers = next_power_of_two(len + 2) - 2; in maybe_resize()
1072 int uv__slurp(const char* filename, char* buf, size_t len) { in uv__slurp() argument
1076 assert(len > 0); in uv__slurp()
1083 n = read(fd, buf, len - 1); in uv__slurp()
1128 size_t len; in uv_os_homedir() local
1146 len = strlen(pwd.homedir); in uv_os_homedir()
1148 if (len >= *size) { in uv_os_homedir()
1149 *size = len + 1; in uv_os_homedir()
1154 memcpy(buffer, pwd.homedir, len + 1); in uv_os_homedir()
1155 *size = len; in uv_os_homedir()
1164 size_t len; in uv_os_tmpdir() local
1193 len = strlen(buf); in uv_os_tmpdir()
1195 if (len >= *size) { in uv_os_tmpdir()
1196 *size = len + 1; in uv_os_tmpdir()
1201 if (len > 1 && buf[len - 1] == '/') { in uv_os_tmpdir()
1202 len--; in uv_os_tmpdir()
1205 memcpy(buffer, buf, len + 1); in uv_os_tmpdir()
1206 buffer[len] = '\0'; in uv_os_tmpdir()
1207 *size = len; in uv_os_tmpdir()
1443 size_t len; in uv_os_getenv() local
1453 len = strlen(var); in uv_os_getenv()
1455 if (len >= *size) { in uv_os_getenv()
1456 *size = len + 1; in uv_os_getenv()
1460 memcpy(buffer, var, len + 1); in uv_os_getenv()
1461 *size = len; in uv_os_getenv()
1497 size_t len; in uv_os_gethostname() local
1506 len = strlen(buf); in uv_os_gethostname()
1508 if (len >= *size) { in uv_os_gethostname()
1509 *size = len + 1; in uv_os_gethostname()
1513 memcpy(buffer, buf, len + 1); in uv_os_gethostname()
1514 *size = len; in uv_os_gethostname()
1939 size_t len = sizeof(nprocs); in uv_available_parallelism() local
1947 if (0 == sysctlbyname(mib[i], &nprocs, &len, NULL, 0) && in uv_available_parallelism()
1948 len == sizeof(nprocs) && in uv_available_parallelism()
1957 size_t len = sizeof(nprocs); in uv_available_parallelism() local
1966 if (0 == sysctl(mib[i], ARRAY_SIZE(mib[i]), &nprocs, &len, NULL, 0) && in uv_available_parallelism()
1967 len == sizeof(nprocs) && in uv_available_parallelism()