Theres nothing wrong with it it's just "non-standard", and I don't like it myself.
Maybe it's a carry over from applications. When main() finishes, the program stops. To some people (like me ), it's counter-intuitive to continue processing events/interrupts after the main function has returned.
All I suggest is that you comment it well.
jmp $ or hlt?
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:jmp $ or hlt?
usually, that's not the way you make it. The "idle loop" is there for cases where system is idle. Screensavers or Seti@HOME are rather low-priority threads that are started when the system detects no activity for a given period of time.Candamir wrote:There you had to implement SETI or whatever...Code: Select all
hltloop: hlt jmp hltloop
The idle loop, instead, is always there, as soon as there's no thread ready in the system, it gets executed until any thread is ready.