From: Andy Wingo <wingo(a)pobox.com>
socketpair(2) will do, either polling or reading in the low priority
thread will sleep until the high priority thread writes a byte.
I hope we get all the possible methods listed now.
I have used signals for years in my alsashmrec. One process
reads A/D to a ring buffer and another process empties the ring
buffer to the disk. The problem was how to make the disk
process (non-RT process) to wait.
When the disk process has no data in the ring buffer, it goes to
sleep:
kill((pid_t)diskpid,SIGSTOP);
When the A/D process has written enough data to the ring buffer,
it wakes up the disk process:
kill((pid_t)diskpid,SIGCONT);
Because A/D process uses smaller buffer size, the A/D process
is executed multiple times before SIGCONT is sent.
Juhana
--
http://music.columbia.edu/mailman/listinfo/linux-graphics-dev
for developers of open source graphics software