Subject:
|
Re: Proposal: int program_running()
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Thu, 21 Mar 2002 00:57:17 GMT
|
Viewed:
|
1886 times
|
| |
| |
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. 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.
I really like legOS. I have learned a ton in the last couple days. Sure, I
work with interesting and complex software systems at work... but not an OS.
I have taken peticular interest in the memory management and task
scheduling. AAMOF, the biggest mod that I have made is a simplified task
scheduler. Ok, it was more for learning than anything else, but it cuts the
kernel size by about 300 bytes. Performance should be slightly enhanced as
well.
Joe
(so, how should I submit mods? Is lugnet the right place, or should I get a
sourceforge account)
"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 has 1 Reply: | | Re: Proposal: int program_running()
|
| 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 (...) (23 years ago, 21-Mar-02, to lugnet.robotics.rcx.legos)
|
Message is in Reply To:
| | Re: Proposal: int program_running()
|
| (...) 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 (...) (23 years ago, 20-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
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|