From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,71b19e01eae3a390 X-Google-Attributes: gid103376,public From: rracine@draper.com (Roger Racine) Subject: Re: delay until and GNAT - expand Date: 1999/05/12 Message-ID: #1/1 X-Deja-AN: 476977578 Sender: nntp@news.draper.com (NNTP Master) References: <7gpukr$s82$1@nnrp1.dejanews.com> <7grkbb$cee$1@nnrp1.deja.com> <7grvka$lc5$1@nnrp1.deja.com> <7h1e10$drg$1@nnrp1.deja.com> In article <7h9nal$9dr$1@nnrp1.deja.com> Robert Dewar writes: >In article <7h9j77$61l$1@nnrp1.deja.com>, > dennison@telepath.com wrote: >> What I am seeing is that "interrupt 0", the clock interrupt, >takes about >> 11 micro seconds. Then the slighly misnamed "idle" task >continues to >> execute for about 11 micros. Then my Ada task begins. Where in >there my >> Ada code starts executing again rather than vxWorks system >calls, I >> cannot tell with Windview. But all totaled that is about 22 >microseconds >> from the clock tick at which the delay expired to the time my >Ada task's >> context was switched to. >20 microseconds sounds much more in the region that I would >expect than Roger's one microsecond. >Robert Dewar We are obviously talking about different metrics. The original message (as expanded) asked about the "delay 0.0" case, not a positive value. So your clock interrupt goes away, as does the idle task execution (which is all of your measured time). All that is needed (not necessarily all that is done) is a check for positive, and, if not, a call to "sched_yield" (POSIX interface), which puts the task at the end of the ready queue and performs a context switch. Let's make sure we are all measuring the same thing. Roger Racine