From a1366f2b1635f6a7622a937244b43d68d64246ca Mon Sep 17 00:00:00 2001 From: dcp1990 Date: Mon, 13 Jun 2005 01:29:57 +0000 Subject: [PATCH] Add a TODO. --- phoned/modem.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/phoned/modem.c b/phoned/modem.c index fba0a99..43b2507 100644 --- a/phoned/modem.c +++ b/phoned/modem.c @@ -170,6 +170,14 @@ void modem_hread(char* cbuf) } pthread_mutex_unlock(&buffermx); } +/* + * XXX: this is inefficient + * TODO: move this so we have a global pipe that is select()ed. + * Threads lock its mutex, write ONE BYTE to it, and the select() receives it. The calling thread unlocks the pipe mux. + * This unlocks the modem mutex, waits, and tries to keep locking (maybe using a conditional) + * until it gets it and reselects. DO IT. (thanks jilles) + * Do all this after a trylock(). + */ void *modem_io(k) void* k; {