Re: Manipulating C code at the AST level, in C
The Natural Philosopher <[email protected]>
| Newsgroups | comp.os.linux.misc |
|---|---|
| Organization | A little, after lunch |
| Message-ID | <[email protected]> |
On 15/08/2026 08:20, rbowman wrote: > On Fri, 14 Aug 2026 23:47:19 -0400, c186282 wrote: > >> Polling, for this sort of thing, has to be >> fast and constant - a big CPU drag. You are >> basically WAITING for something to happen - >> which MAY or may NOT happen at any moment. > > I used select() rather than poll() but I'm archaic. Typically the select > call was in the main loop. The timeout was often 1 second. If the call > returned a ready fd you took care of business. If it timed out, then you > did whatever housekeeping was necessary, making sure it wasn't a long > process. > > Without the select the main loop would chew up 100% of the CPU. Interrupt > have their place but often complex ISRs are used that aren't any faster > than polling. Select probaby uses an ISR -- Renewable energy: Expensive solutions that don't work to a problem that doesn't exist instituted by self legalising protection rackets that don't protect, masquerading as public servants who don't serve the public.