select.cc: Fit comments into 80 columns

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2016-01-07 17:56:33 +01:00
parent 80a800978b
commit 8be00880a0
1 changed files with 12 additions and 11 deletions

View File

@ -133,7 +133,8 @@ select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
{ {
int res = select_stuff::select_loop; int res = select_stuff::select_loop;
LONGLONG start_time = gtod.msecs (); /* Record the current time for later use. */ /* Record the current time for later use. */
LONGLONG start_time = gtod.msecs ();
select_stuff sel; select_stuff sel;
sel.return_on_signal = 0; sel.return_on_signal = 0;
@ -174,15 +175,15 @@ select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
pthread::static_cancel_self (); pthread::static_cancel_self ();
/*NOTREACHED*/ /*NOTREACHED*/
default: default:
res = select_stuff::select_set_zero; /* Set res to zero below. */ res = select_stuff::select_set_zero; /* Set res to zero below. */
break; break;
} }
else if (sel.always_ready || ms == 0) else if (sel.always_ready || ms == 0)
res = 0; /* Catch any active fds via res = 0; /* Catch any active fds via
sel.poll() below */ sel.poll() below */
else else
res = sel.wait (r, w, e, ms); /* wait for an fd to become res = sel.wait (r, w, e, ms); /* wait for an fd to become
become active or time out */ become active or time out */
select_printf ("res %d", res); select_printf ("res %d", res);
if (res >= 0) if (res >= 0)
{ {
@ -199,7 +200,7 @@ select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
all up again. */ all up again. */
sel.cleanup (); sel.cleanup ();
sel.destroy (); sel.destroy ();
/* Recalculate the time remaining to wait if we are going to be looping. */ /* Recalculate time remaining to wait if we are going to be looping. */
if (res == select_stuff::select_loop && ms != INFINITE) if (res == select_stuff::select_loop && ms != INFINITE)
{ {
select_printf ("recalculating ms"); select_printf ("recalculating ms");
@ -436,10 +437,10 @@ next_while:;
default: default:
s = &start; s = &start;
bool gotone = false; bool gotone = false;
/* Some types of objects (e.g., consoles) wake up on "inappropriate" events /* Some types of objects (e.g., consoles) wake up on "inappropriate"
like mouse movements. The verify function will detect these situations. events like mouse movements. The verify function will detect these
If it returns false, then this wakeup was a false alarm and we should go situations. If it returns false, then this wakeup was a false alarm
back to waiting. */ and we should go back to waiting. */
while ((s = s->next)) while ((s = s->next))
if (s->saw_error ()) if (s->saw_error ())
{ {