Commit 6dce769c authored by Pekka Pessi's avatar Pekka Pessi

su/su_wait.c: fixed whitespace

darcs-hash:20081127130725-db55f-6ceea703129f1feabb6fa198778458991a66d4a3.gz
parent 9168c450
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
/**@ingroup su_wait /**@ingroup su_wait
* *
* @CFILE su_wait.c * @CFILE su_wait.c
* Implementation of OS-independent socket synchronization interface. * Implementation of OS-independent socket synchronization interface.
* *
* This looks like nth reincarnation of "reactor". It implements the * This looks like nth reincarnation of "reactor". It implements the
...@@ -121,13 +121,13 @@ void su_wait_init(su_wait_t dst[1]) ...@@ -121,13 +121,13 @@ void su_wait_init(su_wait_t dst[1])
* *
* As a side-effect the socket is put into non-blocking mode when wait * As a side-effect the socket is put into non-blocking mode when wait
* object is created. * object is created.
* *
* @param newwait the newly created wait object (output) * @param newwait the newly created wait object (output)
* @param socket socket * @param socket socket
* @param events mask for events that can signal this wait object * @param events mask for events that can signal this wait object
* *
* @retval 0 if the call was successful, * @retval 0 if the call was successful,
* @retval -1 upon an error. * @retval -1 upon an error.
*/ */
int su_wait_create(su_wait_t *newwait, su_socket_t socket, int events) int su_wait_create(su_wait_t *newwait, su_socket_t socket, int events)
{ {
...@@ -164,7 +164,7 @@ int su_wait_create(su_wait_t *newwait, su_socket_t socket, int events) ...@@ -164,7 +164,7 @@ int su_wait_create(su_wait_t *newwait, su_socket_t socket, int events)
mode |= O_NDELAY | O_NONBLOCK; mode |= O_NDELAY | O_NONBLOCK;
if (fcntl(socket, F_SETFL, mode) < 0) if (fcntl(socket, F_SETFL, mode) < 0)
return -1; return -1;
newwait->fd = socket; newwait->fd = socket;
newwait->events = events; newwait->events = events;
newwait->revents = 0; newwait->revents = 0;
...@@ -177,7 +177,7 @@ int su_wait_create(su_wait_t *newwait, su_socket_t socket, int events) ...@@ -177,7 +177,7 @@ int su_wait_create(su_wait_t *newwait, su_socket_t socket, int events)
* *
* The function su_wait_destroy() destroys a su_wait_t object. * The function su_wait_destroy() destroys a su_wait_t object.
* *
* @param waitobj pointer to wait object * @param waitobj pointer to wait object
* *
* @retval 0 when successful, * @retval 0 when successful,
* @retval -1 upon an error. * @retval -1 upon an error.
...@@ -206,11 +206,11 @@ int su_wait_destroy(su_wait_t *waitobj) ...@@ -206,11 +206,11 @@ int su_wait_destroy(su_wait_t *waitobj)
* The function su_wait() blocks until an event specified by wait objects in * The function su_wait() blocks until an event specified by wait objects in
* @a wait array. If @a timeout is not SU_WAIT_FOREVER, a timeout occurs * @a wait array. If @a timeout is not SU_WAIT_FOREVER, a timeout occurs
* after @a timeout milliseconds. * after @a timeout milliseconds.
* *
* In Unix, this is @c poll() or @c select(). * In Unix, this is @c poll() or @c select().
* *
* In Windows, this is @c WSAWaitForMultipleEvents(). * In Windows, this is @c WSAWaitForMultipleEvents().
* *
* @param waits array of wait objects * @param waits array of wait objects
* @param n number of wait objects in array waits * @param n number of wait objects in array waits
* @param timeout timeout in milliseconds * @param timeout timeout in milliseconds
...@@ -250,20 +250,20 @@ int su_wait(su_wait_t waits[], unsigned n, su_duration_t timeout) ...@@ -250,20 +250,20 @@ int su_wait(su_wait_t waits[], unsigned n, su_duration_t timeout)
return j; return j;
} }
} }
if (errno == EINTR) if (errno == EINTR)
continue; continue;
return -1; return -1;
} }
#endif #endif
} }
/** Get events. /** Get events.
* *
* The function su_wait_events() returns an mask describing events occurred. * The function su_wait_events() returns an mask describing events occurred.
* *
* @param waitobj pointer to wait object * @param waitobj pointer to wait object
* @param s socket * @param s socket
* *
* @return Binary mask describing the events. * @return Binary mask describing the events.
...@@ -285,15 +285,15 @@ int su_wait_events(su_wait_t *waitobj, su_socket_t s) ...@@ -285,15 +285,15 @@ int su_wait_events(su_wait_t *waitobj, su_socket_t s)
} }
/** Set event mask. /** Set event mask.
* *
* The function su_wait_mask() sets the mask describing events that can * The function su_wait_mask() sets the mask describing events that can
* signal the wait object. * signal the wait object.
* *
* @param waitobj pointer to wait object * @param waitobj pointer to wait object
* @param s socket * @param s socket
* @param events new event mask * @param events new event mask
* *
* @retval 0 when successful, * @retval 0 when successful,
* @retval -1 upon an error. * @retval -1 upon an error.
*/ */
int su_wait_mask(su_wait_t *waitobj, su_socket_t s, int events) int su_wait_mask(su_wait_t *waitobj, su_socket_t s, int events)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment