[BUG] RTCB can't be null since g_readytorun is in bss section
Open
Arch: arm
Area: OS Components
OS: Linux
Type: Bug
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 237
Description
### Description / Steps to reproduce the issue
https://github.com/apache/nuttx/blob/master/sched/sched/sched_lock.c#L80-L85
Mentions that `rtcb may be NULL only during early boot-up phases` however RTCB ends up in bss.
```
20002450 g O .bss 00000008 g_readytorun
```
Therefore rtcb is a random value instead of NULL.
Not sure what would be better remove the sched_lock check or initialize g_readytorun as 0.
### On which OS does this issue occur?
[OS: Linux]
### What is the version of your OS?
Ubuntu
### NuttX Version
Master
### Issue Architecture
[Arch: arm]
### Issue Area
[Area: OS Components]
### Verification
- [X] I have verified before submitting the report.
Contributor guide
Assessment
This issue has not been assessed yet.