Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #89904

Re: Manipulating C code at the AST level, in C

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From rbowman <bowman@montana.com>
Newsgroups comp.os.linux.misc
Subject Re: Manipulating C code at the AST level, in C
Date 15 Aug 2026 07:20:57 GMT
Lines 16
Message-ID <neaiapFpk4lU4@mid.individual.net> (permalink)
References <110a9pp$ckmk$6@dont-email.me> <jwvbjdd5gx3.fsf-monnier+comp.lang.lisp@gnu.org> <110nf0q$3vra6$3@dont-email.me> <87y0gg62cx.fsf@nightsong.com> <110rfqf$142ot$1@dont-email.me> <111ne5o$vsm3$3@dont-email.me> <111pbk6$36pi7$1@dont-email.me> <111sb7u$3ua8h$7@dont-email.me> <8fj54lpvg7v6mhi9r9u39tpojbjage8br4@4ax.com> <87mrwdyt0t.fsf@nightsong.com> <1127cho$34rpg$3@dont-email.me> <112o4aa$cpek$2@dont-email.me> <87jyqdtumj.fsf@gmail.com> <tYQaS.4286$ZjVb.2337@fx12.ams4> <87bjbn2nhs.fsf@safunu.org> <ee5bS.4431$la89.3295@fx06.ams4> <877bm4zgsp.fsf@safunu.org> <1150b48$3blde$3@dont-email.me> <EgNdS.164899$4Fu9.91217@fx05.ams4> <87h5l1so79.fsf@safunu.org> <115do8s$3i42e$2@dont-email.me> <115mu22$2evoe$4@dont-email.me> <nACdnfS17rW7fOL3nZ2dnZfqnPudnZ2d@giganews.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Trace individual.net UMahySmQ1MU8UqWQZOGqqQnVAxcx+btMg6Of0atOJpxlezV0d6
Cancel-Lock sha1:DGwODD1aVn0G7Q5bhqmYz41T/sM= sha256:z+RImSc4Z1hVVPh1rLYZT6DAlchBrboBxMjYvNS826w=
User-Agent Pan/0.165 (Kostiantynivka)
Xref csiph.com comp.os.linux.misc:89904

Show key headers only | View raw


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. 

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Manipulating C code at the AST level, in C Nuno Silva <nunojsilva@invalid.invalid> - 2026-08-14 12:26 +0100
  Re: Manipulating C code at the AST level, in C Geoff Clare <geoff@clare.See-My-Signature.invalid> - 2026-08-14 13:53 +0100
    Re: Manipulating C code at the AST level, in C Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-14 21:10 +0000
  Re: Manipulating C code at the AST level, in C scott@slp53.sl.home (Scott Lurndal) - 2026-08-14 16:00 +0000
  Re: Manipulating C code at the AST level, in C c186282 <c186282@nnada.net> - 2026-08-14 23:47 -0400
    Re: Manipulating C code at the AST level, in C rbowman <bowman@montana.com> - 2026-08-15 07:20 +0000
      Re: Manipulating C code at the AST level, in C The Natural Philosopher <tnp@invalid.invalid> - 2026-08-15 11:33 +0100
      Re: Manipulating C code at the AST level, in C c186282 <c186282@nnada.net> - 2026-08-15 22:41 -0400
        Re: Manipulating C code at the AST level, in C "Carlos E. R." <robin_listas@es.invalid> - 2026-08-16 10:50 +0200
    Re: Manipulating C code at the AST level, in C Jim Jackson <jj@franjam.org.uk> - 2026-08-15 11:07 +0000
      Re: Manipulating C code at the AST level, in C The Natural Philosopher <tnp@invalid.invalid> - 2026-08-15 12:18 +0100
    Re: Manipulating C code at the AST level, in C Richard Kettlewell <invalid@invalid.invalid> - 2026-08-15 12:20 +0100
      Re: Manipulating C code at the AST level, in C c186282 <c186282@nnada.net> - 2026-08-16 02:09 -0400
        Re: Manipulating C code at the AST level, in C Richard Kettlewell <invalid@invalid.invalid> - 2026-08-16 09:59 +0100
          Re: Manipulating C code at the AST level, in C The Natural Philosopher <tnp@invalid.invalid> - 2026-08-16 11:42 +0100

csiph-web