src,test: clean up #include directives
This commit is contained in:
parent
027fb4a419
commit
a627f365fd
@ -1,12 +1,11 @@
|
||||
#include <malloc.h>
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "afd.h"
|
||||
#include "error.h"
|
||||
#include "nt.h"
|
||||
#include "util.h"
|
||||
#include "win.h"
|
||||
#include "ws.h"
|
||||
|
||||
#define IOCTL_AFD_POLL 0x00012024
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
|
||||
#include "internal.h"
|
||||
#include "nt.h"
|
||||
#include "util.h"
|
||||
#include "win.h"
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
#include "init.h"
|
||||
#include "port.h"
|
||||
#include "thread-safe-tree.h"
|
||||
#include "util.h"
|
||||
#include "wepoll.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "afd.h"
|
||||
#include "api.h"
|
||||
#include "init.h"
|
||||
#include "nt.h"
|
||||
#include "reflock.h"
|
||||
#include "util.h"
|
||||
#include "win.h"
|
||||
#include "ws.h"
|
||||
|
||||
static bool init__done = false;
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
#include <assert.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "afd.h"
|
||||
#include "error.h"
|
||||
#include "poll-group.h"
|
||||
#include "port.h"
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
#ifndef WEPOLL_POLL_GROUP_H_
|
||||
#define WEPOLL_POLL_GROUP_H_
|
||||
|
||||
#include "error.h"
|
||||
#include "internal.h"
|
||||
#include "queue.h"
|
||||
#include "win.h"
|
||||
|
||||
typedef struct port_state port_state_t;
|
||||
typedef struct poll_group poll_group_t;
|
||||
typedef struct port_state port_state_t;
|
||||
typedef struct queue_node queue_node_t;
|
||||
|
||||
WEPOLL_INTERNAL poll_group_t* poll_group_acquire(port_state_t* port);
|
||||
WEPOLL_INTERNAL void poll_group_release(poll_group_t* poll_group);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include <assert.h>
|
||||
#include <malloc.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
10
src/port.h
10
src/port.h
@ -1,18 +1,14 @@
|
||||
#ifndef WEPOLL_PORT_H_
|
||||
#define WEPOLL_PORT_H_
|
||||
|
||||
#include "afd.h"
|
||||
#include "internal.h"
|
||||
#include "poll-group.h"
|
||||
#include "queue.h"
|
||||
#include "sock.h"
|
||||
#include "thread-safe-tree.h"
|
||||
#include "tree.h"
|
||||
#include "util.h"
|
||||
#include "wepoll.h"
|
||||
#include "win.h"
|
||||
|
||||
typedef struct port_state port_state_t;
|
||||
typedef struct queue queue_t;
|
||||
typedef struct sock_state sock_state_t;
|
||||
typedef struct ts_tree_node ts_tree_node_t;
|
||||
|
||||
WEPOLL_INTERNAL port_state_t* port_new(HANDLE* iocp_handle_out);
|
||||
WEPOLL_INTERNAL int port_close(port_state_t* port_state);
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "error.h"
|
||||
|
||||
@ -19,8 +19,6 @@
|
||||
* should use another lock to guarantee that this can't happen.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
typedef struct reflock {
|
||||
|
||||
@ -1,14 +1,17 @@
|
||||
#include <assert.h>
|
||||
#include <malloc.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "afd.h"
|
||||
#include "error.h"
|
||||
#include "poll-group.h"
|
||||
#include "port.h"
|
||||
#include "queue.h"
|
||||
#include "sock.h"
|
||||
#include "tree.h"
|
||||
#include "util.h"
|
||||
#include "wepoll.h"
|
||||
#include "ws.h"
|
||||
|
||||
|
||||
@ -1,17 +1,14 @@
|
||||
#ifndef WEPOLL_SOCK_H_
|
||||
#define WEPOLL_SOCK_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "internal.h"
|
||||
#include "queue.h"
|
||||
#include "tree.h"
|
||||
#include "util.h"
|
||||
#include "wepoll.h"
|
||||
#include "win.h"
|
||||
|
||||
typedef struct port_state port_state_t;
|
||||
typedef struct queue_node queue_node_t;
|
||||
typedef struct sock_state sock_state_t;
|
||||
typedef struct tree_node tree_node_t;
|
||||
|
||||
WEPOLL_INTERNAL sock_state_t* sock_new(port_state_t* port_state,
|
||||
SOCKET socket);
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "tree.h"
|
||||
#include "util.h"
|
||||
|
||||
void tree_init(tree_t* tree) {
|
||||
memset(tree, 0, sizeof *tree);
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "internal.h"
|
||||
#include "util.h"
|
||||
|
||||
/* 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
|
||||
|
||||
@ -1,12 +1,9 @@
|
||||
#ifndef WEPOLL_UTIL_H_
|
||||
#define WEPOLL_UTIL_H_
|
||||
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
#define array_count(a) (sizeof(a) / (sizeof((a)[0])))
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
2
src/ws.c
2
src/ws.c
@ -1,8 +1,6 @@
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "error.h"
|
||||
#include "util.h"
|
||||
#include "win.h"
|
||||
#include "ws.h"
|
||||
|
||||
|
||||
1
src/ws.h
1
src/ws.h
@ -2,7 +2,6 @@
|
||||
#define WEPOLL_WS_H_
|
||||
|
||||
#include "internal.h"
|
||||
#include "util.h"
|
||||
#include "win.h"
|
||||
|
||||
WEPOLL_INTERNAL int ws_global_init(void);
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "test-util.h"
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "test-util.h"
|
||||
#include "util.h"
|
||||
#include "wepoll.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "test-util.h"
|
||||
#include "util.h"
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "test-util.h"
|
||||
#include "util.h"
|
||||
#include "wepoll.h"
|
||||
#include "win.h"
|
||||
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "error.h"
|
||||
#include "test-util.h"
|
||||
#include "wepoll.h"
|
||||
#include "win.h"
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "init.h"
|
||||
#include "test-util.h"
|
||||
#include "util.h"
|
||||
#include "wepoll.h"
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#include <process.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
#include <malloc.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "test-util.h"
|
||||
#include "tree.h"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "error.h"
|
||||
#include "test-util.h"
|
||||
#include "wepoll.h"
|
||||
#include "win.h"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user