error messages

This commit is contained in:
twoneis 2025-04-25 08:27:24 +02:00
parent 41be12989a
commit 8173bc6b20

View file

@ -48,9 +48,19 @@ main(void)
printf("main: spray to reduce TLB noise part 1: %u objects\n",
PIPE_BUFFER);
for (size_t i = 0; i < SPRAY; i++) {
pipe2(pipes[i], O_NONBLOCK);
fcntl(pipes[i][0], F_SETPIPE_SZ, 2 << 12);
write(pipes[i][1], buffer, 8);
int ret;
ret = pipe2(pipes[i], O_NONBLOCK);
if (ret < 0) {
printf("main: error: pipe2: object %lu\n", i);
}
ret = fcntl(pipes[i][0], F_SETPIPE_SZ, 2 << 12);
if (ret < 0) {
printf("main: error: fcntl: object %lu\n", i);
}
ret = write(pipes[i][1], buffer, 8);
if (ret < 0) {
printf("main: error: write: object %lu\n", i);
}
}
// May need socket and two parts instead