Lines Matching refs:len
48 sys_send(int sockfd, const void *buf, size_t len, int flags)
51 sockfd, (long) buf, len, flags, 0);
58 sys_recv(int sockfd, const void *buf, size_t len, int flags)
61 sockfd, (long) buf, len, flags, 0);
68 transpose(char *str, const size_t len)
72 for (i = 0; i < len / 2; ++i) {
74 str[i] = str[len - 1 - i];
75 str[len - 1 - i] = c;
83 const size_t len = strlen(av[1]);
84 assert(len);
85 char *const buf0 = tail_alloc(len);
86 char *const buf1 = tail_alloc(len);
87 memcpy(buf0, av[1], len);
96 assert(sys_send(0, buf0, len, MSG_DONTROUTE) == (int) len);
97 assert(sys_recv(1, buf1, len, MSG_WAITALL) == (int) len);
99 transpose(buf1, len);
100 assert(sys_send(1, buf1, len, MSG_DONTROUTE) == (int) len);
104 assert(sys_recv(0, buf0, len, MSG_WAITALL) == (int) len);
107 assert(sys_recv(0, NULL, len, MSG_DONTWAIT) == -1);