nuttx/sched/tls
Jukka Laitinen 2b1cf42387
Some checks are pending
Build Documentation / build-html (push) Waiting to run
MemBrowse Memory Report / changes-filter (push) Waiting to run
MemBrowse Memory Report / load-targets (push) Waiting to run
MemBrowse Memory Report / identical (push) Blocked by required conditions
MemBrowse Memory Report / analyze (push) Blocked by required conditions
sched: Fix stdio initialization of standard streams when buffering is disabled
When stdio buffering is disabled, fgetc/getchar on stdin always returned EOF
because fs_cookie and fs_oflags were left uninitialized and lib_fread_unlocked
bails out on (fs_oflags & O_RDOK) == 0.

Fix this by moving the initialization of the fs_cookie and fs_oflags outside the
CONFIG check; these fields need to be initialized regardless of
CONFIG_STDIO_DISABLE_BUFFERING.

In addition, initializing stream[i].fs_iofunc pointers to NULL is redundant
since the task group is allocated with kmm_zalloc/group_zalloc. Zero
allocation was already assumed on fs_flags, so remove the unnecessary code.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2026-08-18 15:19:45 -03:00
..
CMakeLists.txt sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
Make.defs sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
task_initinfo.c sched: Fix stdio initialization of standard streams when buffering is disabled 2026-08-18 15:19:45 -03:00
task_uninitinfo.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
tls.h sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
tls_dupinfo.c pthread: remove tl_lock 2026-01-26 20:56:12 +08:00
tls_initinfo.c pthread: remove tl_lock 2026-01-26 20:56:12 +08:00