To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2379
2378  |  2380
Subject: 
Re: Proposal: int program_running()
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 21 Mar 2002 15:07:43 GMT
Viewed: 
1805 times
  
ROSCO,

Well, I was wrong about the inline function.  I sure am learning a lot these
days 8-)

I tried it both ways (inline func and macro)... turns out the macro produces
less code by about 50 bytes.  (that will be the last time I post without
trying it out first!  sorry about that!)

Also, last night I discovered that in mm_try_join  (mm.c)  The while loop is
only terminated when a non-free memory block is found.  I am wondering what
will happen if you mm_try_join on a block and all the remaining blocks are
free... the next pointer would overflow (wrap-around?).  Is there something
that I don't know... like a in-use block at the end that would prevent this?

Joe


"Joseph Woolley" <jwoolley@spamblock.insight.rr.com> wrote in message
news:GtAt5u.MGJ@lugnet.com...

<snip>


I like the idea of the inline function best, but will leave that up for
debate.  I was wrong about the placement though.  I think tm.h is a better
place for it.  When it comes to the #ifdef... it has to be there anyway;
nb_tasks is inside the #ifdef CONF_TM, so this macro/function would
logically be as well.

Joe


<snip>


"Ross Crawford" <rcrawford@csi.com> wrote in message
news:GtAM9t.4uo@lugnet.com...
In lugnet.robotics.rcx.legos, Joseph Woolley writes:

I would like to propose that the following inline function (or if • necessary,
macro) be used instead.  This would likely be placed in program.h • within
#ifdef CONF_PROGRAM ... #endif

inline int program_running() {
return (nb_tasks > 3);
}

Any comments or suggestions?  I would make the patch myself, but am not
familiar with the tools to do so.

I've thought about this before but never did anything 8?( I think I'd • prefer a
macro, thus removing the need for #ifdef. Although you wouldn't want the • #ifdef
anyway, as you need to call it in the kernel, and #ifdefing it out would • be
rather deterimental 8?)

ROSCO





Message is in Reply To:
  Re: Proposal: int program_running()
 
I know it is fairly trivial, but it is a start. I am working on some other things... hopefully to be included either in patch form or in 0.2.6 (if/when it comes about). I like the idea of the inline function best, but will leave that up for debate. (...) (23 years ago, 21-Mar-02, to lugnet.robotics.rcx.legos)

4 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR