src: use more condensed style for short comments
This commit is contained in:
parent
7c52fee8be
commit
0fbf0e2b0e
11
src/afd.c
11
src/afd.c
@ -37,8 +37,7 @@ static const GUID _AFD_PROVIDER_GUID_LIST[] = {
|
||||
|
||||
/* This protocol info record is used by afd_create_driver_socket() to create
|
||||
* sockets that can be used as the first argument to afd_poll(). It is
|
||||
* populated on startup by afd_global_init().
|
||||
*/
|
||||
* populated on startup by afd_global_init(). */
|
||||
static WSAPROTOCOL_INFOW _afd_driver_socket_template;
|
||||
|
||||
static const WSAPROTOCOL_INFOW* _afd_find_protocol_info(
|
||||
@ -76,8 +75,7 @@ int afd_global_init(void) {
|
||||
|
||||
/* Find a WSAPROTOCOL_INFOW structure that we can use to create an MSAFD
|
||||
* socket. Preferentially we pick a UDP socket, otherwise try TCP or any
|
||||
* other type.
|
||||
*/
|
||||
* other type. */
|
||||
for (;;) {
|
||||
afd_info = _afd_find_protocol_info(infos, infos_count, IPPROTO_UDP);
|
||||
if (afd_info != NULL)
|
||||
@ -174,9 +172,8 @@ int afd_poll(SOCKET driver_socket,
|
||||
sizeof *poll_info);
|
||||
|
||||
if (overlapped == NULL) {
|
||||
/* If this is a blocking operation, wait for the event to become
|
||||
* signaled, and then grab the real status from the io status block.
|
||||
*/
|
||||
/* If this is a blocking operation, wait for the event to become signaled,
|
||||
* and then grab the real status from the io status block. */
|
||||
if (status == STATUS_PENDING) {
|
||||
DWORD r = WaitForSingleObject(event, INFINITE);
|
||||
|
||||
|
||||
@ -214,8 +214,7 @@ int ep_port_wait(ep_port_t* port_info,
|
||||
}
|
||||
|
||||
/* Compute the timeout for GetQueuedCompletionStatus, and the wait end
|
||||
* time, if the user specified a timeout other than zero or infinite.
|
||||
*/
|
||||
* time, if the user specified a timeout other than zero or infinite. */
|
||||
if (timeout > 0) {
|
||||
due = GetTickCount64() + timeout;
|
||||
gqcs_timeout = (DWORD) timeout;
|
||||
@ -228,8 +227,7 @@ int ep_port_wait(ep_port_t* port_info,
|
||||
EnterCriticalSection(&port_info->lock);
|
||||
|
||||
/* Dequeue completion packets until either at least one interesting event
|
||||
* has been discovered, or the timeout is reached.
|
||||
*/
|
||||
* has been discovered, or the timeout is reached. */
|
||||
for (;;) {
|
||||
ULONGLONG now;
|
||||
|
||||
|
||||
@ -7,10 +7,9 @@
|
||||
#include "internal.h"
|
||||
#include "util.h"
|
||||
|
||||
/* NB: the tree functions do not set errno or LastError when they fail. Each of
|
||||
* the API functions has at most one failure mode. It is up to the caller to
|
||||
* set an appropriate error code when necessary.
|
||||
*/
|
||||
/* N.b.: the tree functions do not set errno or LastError when they fail. Each
|
||||
* of the API functions has at most one failure mode. It is up to the caller to
|
||||
* set an appropriate error code when necessary. */
|
||||
|
||||
typedef struct tree tree_t;
|
||||
typedef struct tree_node tree_node_t;
|
||||
|
||||
3
src/ws.c
3
src/ws.c
@ -42,8 +42,7 @@ SOCKET ws_get_base_socket(SOCKET socket) {
|
||||
}
|
||||
|
||||
/* Retrieves a copy of the winsock catalog.
|
||||
* The infos pointer must be released by the caller with free().
|
||||
*/
|
||||
* The infos pointer must be released by the caller with free(). */
|
||||
ssize_t ws_get_protocol_catalog(WSAPROTOCOL_INFOW** infos_out) {
|
||||
DWORD buffer_size = _WS_INITIAL_CATALOG_BUFFER_SIZE;
|
||||
int count;
|
||||
|
||||
@ -200,10 +200,9 @@ int main(void) {
|
||||
}
|
||||
|
||||
{
|
||||
/* Add the *write* socket to the epoll set. The event mask is empty,
|
||||
* but since EPOLLHUP and EPOLLERR are always reportable, the next call to
|
||||
* epoll_wait() should be able to detect that the connection is now closed.
|
||||
*/
|
||||
/* Add the *write* socket to the epoll set. The event mask is empty, but
|
||||
* since EPOLLHUP and EPOLLERR are always reportable, the next call to
|
||||
* epoll_wait() should detect that the connection has been closed. */
|
||||
struct epoll_event ev;
|
||||
int r;
|
||||
|
||||
|
||||
@ -53,8 +53,7 @@ int main(void) {
|
||||
|
||||
r = connect(sock, (struct sockaddr*) &address, sizeof address);
|
||||
/* Unlike unix, windows sets the error to EWOULDBLOCK when the connection
|
||||
* is being established in the background.
|
||||
*/
|
||||
* is being established in the background. */
|
||||
check(r == 0 || WSAGetLastError() == WSAEWOULDBLOCK);
|
||||
|
||||
ev.events = EPOLLOUT | EPOLLERR | EPOLLONESHOT;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user