diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-29 00:53:50 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-29 00:53:50 +0100 |
| commit | 0f95c7d1056cab5bd8c6334cf601349ac4631457 (patch) | |
| tree | c7c27709ef3695659ab4b743d7ae359d4ece272b /trackerlogic.h | |
| parent | 2812a6795149f68226e940212c511b7c625c81d5 (diff) | |
Revert last wake-up experiment. Having each udp worker wake up once a second to check if the tracker stops is wasteful
Diffstat (limited to 'trackerlogic.h')
| -rw-r--r-- | trackerlogic.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/trackerlogic.h b/trackerlogic.h index ad6c911..7d0693a 100644 --- a/trackerlogic.h +++ b/trackerlogic.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #ifndef OT_TRACKERLOGIC_H__ | 6 | #ifndef OT_TRACKERLOGIC_H__ |
| 7 | #define OT_TRACKERLOGIC_H__ | 7 | #define OT_TRACKERLOGIC_H__ |
| 8 | 8 | ||
| 9 | #include <signal.h> | ||
| 9 | #include <stdatomic.h> | 10 | #include <stdatomic.h> |
| 10 | #include <stdint.h> | 11 | #include <stdint.h> |
| 11 | #include <stdlib.h> | 12 | #include <stdlib.h> |
| @@ -90,6 +91,9 @@ static inline ot_time time_future_seconds(int span) { return time_now_seconds() | |||
| 90 | /* Cleared from the interrupt handler and read by every worker */ | 91 | /* Cleared from the interrupt handler and read by every worker */ |
| 91 | extern _Atomic int g_opentracker_running; | 92 | extern _Atomic int g_opentracker_running; |
| 92 | 93 | ||
| 94 | /* Sent to a thread parked in a blocking read */ | ||
| 95 | #define OT_SIGNAL_WAKE SIGUSR1 | ||
| 96 | |||
| 93 | 97 | ||
| 94 | extern uint32_t g_tracker_id; | 98 | extern uint32_t g_tracker_id; |
| 95 | typedef enum { FLAG_TCP, FLAG_UDP, FLAG_MCA, FLAG_SELFPIPE } PROTO_FLAG; | 99 | typedef enum { FLAG_TCP, FLAG_UDP, FLAG_MCA, FLAG_SELFPIPE } PROTO_FLAG; |
