Compare commits
No commits in common. "main" and "feat/optimized" have entirely different histories.
main
...
feat/optim
3 changed files with 5 additions and 13 deletions
4
Makefile
4
Makefile
|
|
@ -20,8 +20,8 @@ TARGETS = pixelflut-render pixelflut-bench
|
||||||
|
|
||||||
all: $(TARGETS)
|
all: $(TARGETS)
|
||||||
|
|
||||||
pixelflut-render: pixelflut.c pixelflut.h
|
pixelflut-render: new.c pixelflut.h
|
||||||
$(CC) $(STD) $(OPT) -pthread $(WARN) $(EXTRA) -o $@ pixelflut.c
|
$(CC) $(STD) $(OPT) -pthread $(WARN) $(EXTRA) -o $@ new.c
|
||||||
|
|
||||||
pixelflut-bench: bench.c pixelflut.h
|
pixelflut-bench: bench.c pixelflut.h
|
||||||
$(CC) $(STD) $(OPT) -pthread $(WARN) $(EXTRA) -o $@ bench.c
|
$(CC) $(STD) $(OPT) -pthread $(WARN) $(EXTRA) -o $@ bench.c
|
||||||
|
|
|
||||||
12
pixelflut.c
12
pixelflut.c
|
|
@ -65,7 +65,7 @@
|
||||||
#define FRAME_BYTES (FRAME_PIXELS * FRAME_CHANNELS)
|
#define FRAME_BYTES (FRAME_PIXELS * FRAME_CHANNELS)
|
||||||
|
|
||||||
/* Top-left corner where the frame is drawn on the shared wall. */
|
/* Top-left corner where the frame is drawn on the shared wall. */
|
||||||
#define CANVAS_OFFSET_X 80
|
#define CANVAS_OFFSET_X 1200
|
||||||
#define CANVAS_OFFSET_Y 40
|
#define CANVAS_OFFSET_Y 40
|
||||||
|
|
||||||
/* Number of datagrams needed to cover a whole frame once. */
|
/* Number of datagrams needed to cover a whole frame once. */
|
||||||
|
|
@ -231,21 +231,15 @@ static void *worker_main(void *arg)
|
||||||
/* Transient back-pressure. Back off briefly so the queue
|
/* Transient back-pressure. Back off briefly so the queue
|
||||||
* drains (rather than spinning on failing syscalls), then
|
* drains (rather than spinning on failing syscalls), then
|
||||||
* resend the same batch - no need to repaint. */
|
* resend the same batch - no need to repaint. */
|
||||||
usleep(100);
|
usleep(200);
|
||||||
continue;
|
continue;
|
||||||
case ECONNREFUSED:
|
case ECONNREFUSED:
|
||||||
break; /* stale ICMP on connected UDP; repaint and retry */
|
break; /* stale ICMP on connected UDP; repaint and retry */
|
||||||
case EHOSTUNREACH: /* display down / IPv6 ND unresolved */
|
|
||||||
case ENETUNREACH:
|
|
||||||
case EHOSTDOWN:
|
|
||||||
case ENETDOWN:
|
|
||||||
usleep(100000);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
perror("sendmmsg");
|
perror("sendmmsg");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break; /* ECONNREFUSED / unexpected: stop, repaint, retry */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
2
run.sh
2
run.sh
|
|
@ -1,2 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
./pixelflut-render ix1 2
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue