site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=KChK52YoFRn5neakCab0H1onZjmZFPCF17E7Fjo2xAs=; b=T3Klo7bEa/iBI4OPHRm/AHe3bvRUMRWuJwj/dfBU699njwyxluRwi611nInwJohQTT XBNql1NZwO7Bhi+Z9cc79d0bD5jaeMjnml139j5Wtpva/9PdlgXRw7ZNB2mlLxkL+oTc 4A34KsLGg4hPW3stp8h8ippSdiWZdzB43Avqk= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=Dp480jkwOh1JqI76zbeI20qO5M8zPCaKibu0EyKcE8kqwuCvHmLOGItgk6cymXggED QHYkEj5LbNZuteqNNyGt3KltU92mM56hjf73qhucVh0gxAyb0r62OjVx7IgpHphRr8AW dMp5k3Cc5TGYaFnjaA1J83dHJYfGxYgtgYkHU= On Nov 25, 2008, at 10:24 PM, Rakesh Singhal wrote: Hi all I want to get the notification for event on virtual serial (modem) port. I am using select() API to polling on it. I get notification in this case, but if I do not read the data or reading handling thread is busy, then also it keeps giving notification that data is there. I want to get the notification only when there any new event happen or new data comes. Eli _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Please suggest me to resolve the issue. Keep track of it yourself then. Set a flag in your own code when select() tells you the serial port has data that your 'worker' thread checks/clears before it goes idle, then stop passing that port to select() until your worker thread clears that flag. Waking up select() to re-add the port when the worker thread goes idle is left as an exercise for the reader. This email sent to site_archiver@lists.apple.com
participants (1)
-
Eli Bach