1
10
13
14
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
105
106
107
108
109
115
116
117
118
119
120
121
122
123
134
135
136
137
148
149
150
151
152
153
154
155
156
157
159
160
161
162
163
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
185
186
187
188
189
195
196
197
198
199
200
201
202
203
204
205
...
...
...
#define NX_SOURCE_CODE
#include "nx_api.h"
#include "nx_ip.h"
#include "nx_tcp.h"
...
...
VOID _nx_tcp_deferred_cleanup_check(NX_IP *ip_ptr)
{
ULONG created_sockets;
ULONG suspended_threads;
NX_TCP_SOCKET *socket_ptr;
TX_THREAD *thread_ptr;
socket_ptr = ip_ptr -> nx_ip_tcp_created_sockets_ptr;
created_sockets = ip_ptr -> nx_ip_tcp_created_sockets_count;
while (created_sockets--)
{
suspended_threads = socket_ptr -> nx_tcp_socket_bind_suspended_count;
if (suspended_threads)
{
thread_ptr = socket_ptr -> nx_tcp_socket_bind_suspension_list;
/* ... */
do
{
if (thread_ptr -> tx_thread_suspend_cleanup == _nx_tcp_cleanup_deferred)
{
_nx_tcp_client_bind_cleanup(thread_ptr NX_CLEANUP_ARGUMENT);
}if (thread_ptr -> tx_thread_suspend_cleanup == _nx_tcp_cleanup_deferred) { ... }
thread_ptr = thread_ptr -> tx_thread_suspended_next;
...} while (--suspended_threads);
}if (suspended_threads) { ... }
thread_ptr = socket_ptr -> nx_tcp_socket_connect_suspended_thread;
if (thread_ptr)
{
if (thread_ptr -> tx_thread_suspend_cleanup == _nx_tcp_cleanup_deferred)
{
_nx_tcp_connect_cleanup(thread_ptr NX_CLEANUP_ARGUMENT);
}if (thread_ptr -> tx_thread_suspend_cleanup == _nx_tcp_cleanup_deferred) { ... }
}if (thread_ptr) { ... }
thread_ptr = socket_ptr -> nx_tcp_socket_disconnect_suspended_thread;
if (thread_ptr)
{
if (thread_ptr -> tx_thread_suspend_cleanup == _nx_tcp_cleanup_deferred)
{
_nx_tcp_disconnect_cleanup(thread_ptr NX_CLEANUP_ARGUMENT);
}if (thread_ptr -> tx_thread_suspend_cleanup == _nx_tcp_cleanup_deferred) { ... }
}if (thread_ptr) { ... }
suspended_threads = socket_ptr -> nx_tcp_socket_receive_suspended_count;
if (suspended_threads)
{
thread_ptr = socket_ptr -> nx_tcp_socket_receive_suspension_list;
/* ... */
do
{
if (thread_ptr -> tx_thread_suspend_cleanup == _nx_tcp_cleanup_deferred)
{
_nx_tcp_receive_cleanup(thread_ptr NX_CLEANUP_ARGUMENT);
}if (thread_ptr -> tx_thread_suspend_cleanup == _nx_tcp_cleanup_deferred) { ... }
thread_ptr = thread_ptr -> tx_thread_suspended_next;
...} while (--suspended_threads);
}if (suspended_threads) { ... }
suspended_threads = socket_ptr -> nx_tcp_socket_transmit_suspended_count;
if (suspended_threads)
{
thread_ptr = socket_ptr -> nx_tcp_socket_transmit_suspension_list;
/* ... */
do
{
if (thread_ptr -> tx_thread_suspend_cleanup == _nx_tcp_cleanup_deferred)
{
_nx_tcp_transmit_cleanup(thread_ptr NX_CLEANUP_ARGUMENT);
}if (thread_ptr -> tx_thread_suspend_cleanup == _nx_tcp_cleanup_deferred) { ... }
thread_ptr = thread_ptr -> tx_thread_suspended_next;
...} while (--suspended_threads);
}if (suspended_threads) { ... }
socket_ptr = socket_ptr -> nx_tcp_socket_created_next;
}while (created_sockets--) { ... }
}{ ... }