Skip to content

Commit 366c3d5

Browse files
committed
lil more
1 parent 0ce0a8b commit 366c3d5

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

msgq/msgq.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,11 @@ void msgq_init_publisher(msgq_queue_t * q) {
172172
}
173173

174174
static void thread_signal(uint32_t tid) {
175-
#ifndef SYS_tkill
176-
// TODO: this won't work for multithreaded programs
175+
#ifdef __APPLE__
176+
// macOS doesn't have tkill, rely on polling instead
177+
(void)tid;
178+
#elif !defined(SYS_tkill)
179+
// fallback for systems without tkill
177180
kill(tid, SIGUSR2);
178181
#else
179182
syscall(SYS_tkill, tid, SIGUSR2);

test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ scons -j8
1616
pre-commit run --all-files
1717

1818
# *** test ***
19+
msgq/test_runner
1920
pytest

0 commit comments

Comments
 (0)