Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (1h)  netbsd-10 (18d)  netbsd-9 (18d)  netbsd-8 (23d) 

2024-06-04 07:43:07 UTC Now

2023-04-14 16:51:46 UTC MAIN commitmail json YAML

pserialize(9): Fix bug in recent micro-optimization.

curcpu() is always a valid struct cpu_info pointer, but curlwp->l_cpu
is not necessarily -- early at boot on some architectures (like x86,
apparently) it may be null.

Not clear that l->l_cpu is always a cost win over curcpu(): on some
architectures curcpu() is basically a macro for curlwp->l_cpu, while
on others it is a fixed VA.  So let's use the one that always works
instead of the one that's sometimes cheaper and sometimes crashier.

(riastradh)