Skip to content

Name the posted bit in terminate() - #115

Merged
mgrossmann merged 1 commit into
mainfrom
issue-111-followup-posted-bit
Aug 23, 2026
Merged

Name the posted bit in terminate()#115
mgrossmann merged 1 commit into
mainfrom
issue-111-followup-posted-bit

Conversation

@mgrossmann

Copy link
Copy Markdown
Contributor

The first of the two leftovers noted at the end of #112. The second turned out
not to exist — see below.

The change

terminate() tested the ECB posted bit as a raw 0x40000000U, twice, while the
wait loop in main() a few hundred lines up spells it ECB_POSTED_BIT. Same
bit, same struct field, two vocabularies — and the raw one is the harder to grep
for when the question is "where do we check whether the socket thread has ended".

Generated assembler is byte identical before and after (cc370 -O1 -S, cmp);
clibecb.h defines the macro as exactly that constant.

make clean, make test-host 78/78, tools/check-module-data.py clean.

The other leftover was a false alarm

#112 also said "the bare-__asm__ pattern fixed here exists in other FTPD
sources — this PR only covers src/ftpd.c". That is wrong, and worth correcting
rather than leaving as a standing to-do.

src/ftpd.c is the only file in the repository containing inline assembler
at all — five STIMER sites, all of which already carry
"0", "1", "14", "15" from #114:

src/ftpd.c:227  src/ftpd.c:296  src/ftpd.c:477  src/ftpd.c:622  src/ftpd.c:777

Nothing else in src/, include/ or asm/ has an __asm__ beyond the
SETC '&FUNC' name markers. So there is no follow-up owed here.

The equivalent sweep in libc370, where the pattern really does recur, is
mvslovers/libc370#134.

terminate() tested the ECB posted bit as a raw 0x40000000U, twice, while the
wait loop in main() a few hundred lines up spells it ECB_POSTED_BIT.  Same bit,
same struct field, two vocabularies -- and the raw one is the harder to grep for
when the question is "where do we check whether the socket thread has ended".

Generated assembler is byte identical before and after; clibecb.h defines the
macro as exactly that constant.

Noted as leftover work in #112.
@mgrossmann
mgrossmann merged commit 1b51e16 into main Aug 23, 2026
2 checks passed
@mgrossmann
mgrossmann deleted the issue-111-followup-posted-bit branch August 23, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant