Mercurial > hg > nginx-quic
annotate src/os/unix/ngx_sunpro_sparc64.il @ 8826:3436b441239b quic
HTTP/3: proper uni stream closure detection.
Previously, closure detection for server-initiated uni streams was not properly
implemented. Instead, HTTP/3 code relied on QUIC code posting the read event
and setting rev->error when it needed to close the stream. Then, regular
uni stream read handler called c->recv() and received error, which closed the
stream. This was an ad-hoc solution. If, for whatever reason, the read
handler was called earlier, c->recv() would return 0, which would also close
the stream.
Now server-initiated uni streams have a separate read event handler for
tracking stream closure. The handler calls c->recv(), which normally returns
0, but may return error in case of closure.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 31 Jan 2022 09:46:30 +0300 |
parents | d620f497c50f |
children |
rev | line source |
---|---|
561 | 1 / |
2 / Copyright (C) Igor Sysoev | |
4412 | 3 / Copyright (C) Nginx, Inc. |
561 | 4 / |
5 | |
6 | |
7 / "casa [%o2] 0x80, %o1, %o0" and | |
8 / "casxa [%o2] 0x80, %o1, %o0" do the following: | |
577 | 9 / |
561 | 10 / if ([%o2] == %o1) { |
11 / swap(%o0, [%o2]); | |
12 / } else { | |
13 / %o0 = [%o2]; | |
14 / } | |
15 | |
16 | |
17 / ngx_atomic_uint_t ngx_casa(ngx_atomic_uint_t set, ngx_atomic_uint_t old, | |
18 / ngx_atomic_t *lock); | |
19 / | |
20 / the arguments are passed in the %o0, %o1, %o2 | |
21 / the result is returned in the %o0 | |
22 | |
23 .inline ngx_casa,0 | |
24 casa [%o2] 0x80, %o1, %o0 | |
25 .end | |
26 | |
27 | |
28 / ngx_atomic_uint_t ngx_casxa(ngx_atomic_uint_t set, ngx_atomic_uint_t old, | |
29 / ngx_atomic_t *lock); | |
30 / | |
31 / the arguments are passed in the %o0, %o1, %o2 | |
32 / the result is returned in the %o0 | |
33 | |
34 .inline ngx_casxa,0 | |
35 casxa [%o2] 0x80, %o1, %o0 | |
36 .end |