I have the following situation:
There is a thread that reads from a device with a fread call. This call is blocking as long as there is no data send from the device.
You can use the kill() syscall.
UPDATE
Turns out I misread your question. As R. pointed out below, kill() is only for killing processes, not threads.
kill()