summaryrefslogtreecommitdiff
path: root/kernel/drivers/pit.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-07-04 20:09:51 +0200
committerAnton Kling <anton@kling.gg>2024-07-04 20:10:47 +0200
commitafc2b4d4766b0e4ee8519ac6fcd98353d3864322 (patch)
tree65094046734586e5f2da5d553305103ebb87a34f /kernel/drivers/pit.c
parentf89eef4733b7905dbf362cbde9aebb2dd0dcfe7d (diff)
TCP: Allow delay for sends
This is not at all optimal for applications that already buffer their data but can have a huge impact on those that don't. Applications that don't wish to use this should disable this for their socket.
Diffstat (limited to 'kernel/drivers/pit.c')
-rw-r--r--kernel/drivers/pit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/drivers/pit.c b/kernel/drivers/pit.c
index 9161885..b875449 100644
--- a/kernel/drivers/pit.c
+++ b/kernel/drivers/pit.c
@@ -51,7 +51,8 @@ void int_clock(reg_t *regs) {
timer_current_uptime = tsc_calculate_ms(current_tsc);
random_add_entropy_fast((u8 *)&current_tsc, sizeof(current_tsc));
switch_counter++;
- if (timer_current_uptime - last_flush > 50) {
+ if (timer_current_uptime - last_flush > 5) {
+ tcp_flush_buffers();
tcp_flush_acks();
last_flush = timer_current_uptime;
}