/* *Programthreadlaunch.Oftendefinedasamacroinprocessor.h, *butwe'reshootingforasmallfootprintandit'snotaninner-loop *performance-criticaloperation. * *TheHexagonABIspecifiesthatR28iszero'edbeforeprogramlaunch, *sothatgetsautomaticallydonehere.Ifweeverstopdoingthathere, *we'llprobablywanttodefinetheELF_PLAT_INITmacro.
*/ void start_thread(struct pt_regs *regs, unsignedlong pc, unsignedlong sp)
{ /* We want to zero all data-containing registers. Is this overkill? */
memset(regs, 0, sizeof(*regs)); /* We might want to also zero all Processor registers here */
pt_set_usermode(regs);
pt_set_elr(regs, pc);
pt_set_rte_sp(regs, sp);
}
/* *Spin,orbetterstill,doahardwareorVMwaitinstruction *IfhardwareorVMofferwaitterminationeventhoughinterrupts *aredisabled.
*/ void arch_cpu_idle(void)
{
__vmwait(); /* interrupts wake us up, but irqs are still disabled */
}
int do_work_pending(struct pt_regs *regs, u32 thread_info_flags); int do_work_pending(struct pt_regs *regs, u32 thread_info_flags)
{ if (!(thread_info_flags & _TIF_WORK_MASK)) { return0;
} /* shortcut -- no work to be done */
local_irq_enable();
if (thread_info_flags & _TIF_NEED_RESCHED) {
schedule(); return1;
}
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) {
do_signal(regs); return1;
}
if (thread_info_flags & _TIF_NOTIFY_RESUME) {
resume_user_mode_work(regs); return1;
}
/* Should not even reach here */
panic("%s: bad thread_info flags 0x%08x\n", __func__,
thread_info_flags);
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-10-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.