[MPlayer-dev-eng] [PATCH] Non-blocking mp_msg
Maciej Paszta
paszczi at go2.pl
Thu Jun 9 12:43:08 CEST 2005
On Tuesday 07 June 2005 18:01, Paul Pedaal wrote:
> +int nbfflush(FILE* stream){
> + struct pollfd* fds;
> +
> + fds[0].fd = fileno(stream);
> + fds[0].events = POLLWRNORM;
> + poll(fds, 1, 0);
> + if (fds[0].revents && POLLWRNORM) {
> + fflush(stream);
fds[0].revents holds the events that actually occured (requested by the
fds[0].events or other diagnostic/error values), so if we want to check if
revents holds our POLLWRNORM it should go like this:
if (fds[0].revents & POLLWRNORM)
--
Maciek "paszczi" Paszta .::. paszczi(at)go2.pl .::. JID:macp(at)chrome.pl
gg: 2810043 .::. Linux User #304533 .::. BLUG Member #0247
PGP KeyID:0xF22E4C89 .::. MPlayerPL Team : mplayerpl.emdej.com
More information about the MPlayer-dev-eng
mailing list