Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Replace NOPE with NO-DO |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
5d7f6cacbe8daf55ba7fb20244f81900 |
| User & Date: | bernd 2019-08-26 21:21:20.360 |
Context
|
2019-08-26
| ||
| 21:59 | Revert NOPE check-in: 39625fe0e3 user: bernd tags: trunk | |
| 21:21 | Replace NOPE with NO-DO check-in: 5d7f6cacbe user: bernd tags: trunk | |
| 14:54 | Fix responses to entering new IDs check-in: f880b8bbe9 user: bernd tags: trunk | |
Changes
Changes to net2o.fs.
| ︙ | ︙ | |||
916 917 918 919 920 921 922 |
0= IF data-resend 0 2 cells $del THEN
maxdata +LOOP ;
: data-resend-flush ( -- )
data-resend $@len 0 U+DO
data-resend $@ I /string drop @ 0= IF
data-resend I 2 cells $del
| | | 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 |
0= IF data-resend 0 2 cells $del THEN
maxdata +LOOP ;
: data-resend-flush ( -- )
data-resend $@len 0 U+DO
data-resend $@ I /string drop @ 0= IF
data-resend I 2 cells $del
0 data-resend $@len I unloop U+DO NO-DO
ELSE
[ 2 cells ]L
THEN
+LOOP ;
: remove-resend { nback -- }
data-resend $@ bounds U+DO
|
| ︙ | ︙ | |||
1182 1183 1184 1185 1186 1187 1188 |
resize-sema c-section
ticker 64@ ack@ .ticks-init ;
: o-chunks ( -- )
[: chunks $@ bounds ?DO
I chunk-context @ o = IF
chunks I chunks-struct del$one
| | | 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 |
resize-sema c-section
ticker 64@ ack@ .ticks-init ;
: o-chunks ( -- )
[: chunks $@ bounds ?DO
I chunk-context @ o = IF
chunks I chunks-struct del$one
unloop chunks next$ ?DO NO-DO 0
ELSE chunks-struct THEN +LOOP ;]
resize-sema c-section ;
event: :>send-chunks ( o -- ) .do-send-chunks ;
in net2o : send-chunks sender-task 0= IF do-send-chunks EXIT THEN
<event o elit, :>send-chunks sender-task event> ;
|
| ︙ | ︙ | |||
1348 1349 1350 1351 1352 1353 1354 |
: eval-queue ( -- )
queue $@len 0= ?EXIT ticker 64@
queue $@ bounds ?DO I >o
64dup queue-timestamp 64@ 64u> IF
addr queue-xt @ queue-job @ .execute o>
queue I queue-struct del$one
| | | 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 |
: eval-queue ( -- )
queue $@len 0= ?EXIT ticker 64@
queue $@ bounds ?DO I >o
64dup queue-timestamp 64@ 64u> IF
addr queue-xt @ queue-job @ .execute o>
queue I queue-struct del$one
unloop queue next$ ?DO NO-DO 0
ELSE o> queue-struct THEN
+LOOP 64drop ;
\ poll loop
: prep-evsocks ( -- )
epiper @ fileno POLLIN pollfds fds!+ drop 1 to pollfd# ;
|
| ︙ | ︙ | |||
1924 1925 1926 1927 1928 1929 1930 | I .cc-secret [ tmp-cookie .cc-secret ]L KEYBYTES move cookies I cookie-size# del$one drop unloop dup IF true THEN EXIT THEN I .cc-timeout 64@ timeout 64u< IF cookies I cookie-size# del$one cookies next$ | | | 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 |
I .cc-secret [ tmp-cookie .cc-secret ]L KEYBYTES move
cookies I cookie-size# del$one drop
unloop dup IF true THEN EXIT
THEN
I .cc-timeout 64@ timeout 64u< IF
cookies I cookie-size# del$one
cookies next$
unloop ?DO NO-DO \ this replaces the loop variables
0 \ we re-iterate over the exactly same index
ELSE
cookie-size#
THEN
+LOOP 64drop 0 ;
: ?cookie ( cookie -- context true / false )
|
| ︙ | ︙ |
Changes to tools.fs.
| ︙ | ︙ | |||
171 172 173 174 175 176 177 |
:noname action-of thread-init compile,
r@ compile, postpone off postpone ;
is thread-init
:noname r> compile, postpone $off action-of kill-task compile,
postpone ;
is kill-task ;
| | | | 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
:noname action-of thread-init compile,
r@ compile, postpone off postpone ;
is thread-init
:noname r> compile, postpone $off action-of kill-task compile,
postpone ;
is kill-task ;
[IFUNDEF] NO-DO
: NO-DO ( c:sys -- )
\G removes a control structure sys from the stack
drop 2drop ; immediate restrict
[THEN]
require bits.fs
\ variable length integers, similar to protobuf, but MSB first
|
| ︙ | ︙ | |||
866 867 868 869 870 871 872 |
>r over @ cell+ - tuck r> $del ;
: next$ ( pos string -- addre addrs )
$@ rot /string bounds ;
: del$cell ( addr stringaddr -- ) { string }
string $@ bounds ?DO
dup I @ = IF
string I cell del$one
| | | 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 |
>r over @ cell+ - tuck r> $del ;
: next$ ( pos string -- addre addrs )
$@ rot /string bounds ;
: del$cell ( addr stringaddr -- ) { string }
string $@ bounds ?DO
dup I @ = IF
string I cell del$one
unloop string next$ ?DO NO-DO 0
ELSE cell THEN
+LOOP drop ;
\ unique list of cells
Sema resize-sema
|
| ︙ | ︙ |