[Fwd: Re: Rtems and C++ -- code examples?]

Gerke Kok gerke.kok at tpa-nl.com
Thu Mar 22 14:45:55 UTC 2001


Love to see that omnithread lib!
wkr,
Gerke

-----Oorspronkelijk bericht-----
Van: Rosimildo da Silva [mailto:rdasilva at connecttel.com]
Verzonden: Thursday, March 22, 2001 15:49
Aan: rtems
Onderwerp: [Fwd: Re: Rtems and C++ -- code examples?]


fyi..

From: Rosimildo da Silva <rdasilva at connecttel.com>
Subject: Re: Rtems and C++ -- code examples?
To: cjohns at cybertec.com.au

Chris Johns wrote:
> 
> I have seen worse :-)


Agreed.

> 
> >When I've looked at it, and noticed that everything inherits from
> >RtemsStatusCode or something like that, I decided in one minute that
> >was totally useless.
> >
> 
> That is a little rough. You are correct about the status, and
> it could be fixed.


I thought in fixing it sometime ago. I have written a message
queue encapsulation to use along with omnithread library.
It could be a start point to fix the others. The problem
is that * I am too lazy* to write new code, when the
omnithread library was right there: written and tested.

If anyboady is interested in a Message Queue wrapper, I can post.
It is fully templated, and should be used anywhere.

> 
> >Inheritance is when you have an *is an* relationship, and that
> >code make anyone to puke.
> 
> Yeap, not sure why it is like this.
> 
> >A semaphore is NOT a status. A semaphore may contain one
> >status.
> 
> Agreed. Is this the only issue you see ?


No. The problem is that there was no abstraction of the 
resources, and the code was NOT written in a way to use
its interface on another platform.


> 
> >I usually, use the omnithread library for threads, semaphores,
> >mutex,etc. It has a nice interface and provides multi-paltform
> >capabilities. It allows you to test your code under
> >Windows/Linux/Solaris etc.
> 
> But it is not a match to the C API of RTEMS, and at what memory
> foot print do you end up with just to have a C++ object catch a
> thread. I do not wish to use a CORBA framework to write C++
> code in RTEMS, nor do I wish to add more code which I need to
> maintain and monitor for updates to my systems.


omnithread library has nothing to do with CORBA. It is just
a simple module( posix.cc ). It can be used in any project,
and it is NOT dependent on the ORB run-time. You should give it
a try.

> 
> >I am sorry for whoever wrote that code.
> >I am not trying to affend you.
> 
> You have not in relation to the comments about the code. They
> are welcome.
> 
> You may have offered comments rather than do nothing to help
> correct something you see as wrong or in your view could be
> better rather.


I started doing it. But, I've got involved on another project
and could NOT finish it. It still here in my "todo" list, but
the incomplete peaces still here in my PC, and waiting for some 
free time to finish them.

I'll be happy to provide the message queue + omnihread library
that I use on my projects.

-- 
Rosimildo da Silva            rdasilva at connectel.com 
ConnectTel, Inc.              Austin, TX -- USA      
Phone : 512-338-1111          Fax : 512-918-0449     
Company Page:  http://www.connecttel.com             
Home Page:     http://members.nbci.com/rosimildo/



More information about the users mailing list