blob: 468c5235b242ad389a03dede3ff0b9e71b616aba (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/*
* Authored by Alex Hultman, 2018-2019.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef LOOP_DATA_H
#define LOOP_DATA_H
struct us_internal_loop_data_t {
struct us_timer_t *sweep_timer;
struct us_internal_async *wakeup_async;
int last_write_failed;
struct us_socket_context_t *head;
struct us_socket_context_t *iterator;
char *recv_buf;
void *ssl_data;
void (*pre_cb)(struct us_loop_t *);
void (*post_cb)(struct us_loop_t *);
struct us_socket_t *closed_head;
struct us_socket_t *low_prio_head;
int low_prio_budget;
/* We do not care if this flips or not, it doesn't matter */
long long iteration_nr;
};
#endif // LOOP_DATA_H
|