public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] eCos C++ API
@ 2007-03-21  0:45 Paul D. DeRocco
  2007-03-21  8:29 ` Andrew Lunn
  2007-03-21  9:28 ` [ECOS] " Sergei Organov
  0 siblings, 2 replies; 3+ messages in thread
From: Paul D. DeRocco @ 2007-03-21  0:45 UTC (permalink / raw)
  To: eCos Discuss

Are the C++ objects on which eCos is based supposed to be invisible to the
programmer, so that the designers of eCos can change them at will? Or is it
reasonable for a programmer writing an application in C++ to directly use
the underlying eCos C++ objects? Since everything else in my application is
in C++, I'd much rather do the latter, for instance creating a thread
directly as a Cyg_Thread instead of declaring a cyg_thread and having to
call cyg_thread_create.

I assume kernel.hxx is the appropriate header to include, instead of kapi.h,
right? Is there any documentation on what might be part of the "official"
C++ API, or am I on my own in judging which things in the headers are likely
to be stable and which might disappear in a later version? Massa's book says
there isn't any standard, but that's four years old.

-- 

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco@ix.netcom.com


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] eCos C++ API
  2007-03-21  0:45 [ECOS] eCos C++ API Paul D. DeRocco
@ 2007-03-21  8:29 ` Andrew Lunn
  2007-03-21  9:28 ` [ECOS] " Sergei Organov
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2007-03-21  8:29 UTC (permalink / raw)
  To: Paul D. DeRocco; +Cc: eCos Discuss

On Tue, Mar 20, 2007 at 05:45:24PM -0700, Paul D. DeRocco wrote:
> Are the C++ objects on which eCos is based supposed to be invisible to the
> programmer, so that the designers of eCos can change them at will?

Correct. The only documented and stable API is the C API in
kapi.h. There is nothing to stop you using the C++ objects directly,
but the C++ objects have changed in the past, but not often, eg when
POSIX threads were added. We reserve the right to change the C++
objects. There is no documentation for the C++ objects except the code
itself. Only a few people know the C++ objects, so you will get little
support when you start asking questions.

        Andrew


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ECOS] Re: eCos C++ API
  2007-03-21  0:45 [ECOS] eCos C++ API Paul D. DeRocco
  2007-03-21  8:29 ` Andrew Lunn
@ 2007-03-21  9:28 ` Sergei Organov
  1 sibling, 0 replies; 3+ messages in thread
From: Sergei Organov @ 2007-03-21  9:28 UTC (permalink / raw)
  To: Paul D. DeRocco; +Cc: eCos Discuss

"Paul D. DeRocco" <pderocco@ix.netcom.com> writes:

> Are the C++ objects on which eCos is based supposed to be invisible to the
> programmer, so that the designers of eCos can change them at will? Or is it
> reasonable for a programmer writing an application in C++ to directly use
> the underlying eCos C++ objects? Since everything else in my application is
> in C++, I'd much rather do the latter, for instance creating a thread
> directly as a Cyg_Thread instead of declaring a cyg_thread and having to
> call cyg_thread_create.
>

From practical point of view, the C++ objects didn't change incompatibly
from the time I started to use them back in around 2001/2002. Yes, my
application is in C++ and it seems to be plain overhead to use
C-wrappers over C++ eCos kernel in C++ applications. Though I do use my
own C++ wrappers over eCos C++ kernel, so even if eCos classes change,
the changes to the application will be localized.

> I assume kernel.hxx is the appropriate header to include, instead of kapi.h,
> right? Is there any documentation on what might be part of the "official"
> C++ API, or am I on my own in judging which things in the headers are likely
> to be stable and which might disappear in a later version? Massa's book says
> there isn't any standard, but that's four years old.

There is still no "official" standard eCos C++ API. You will need to
include headers that contain required declarations. For example, my
mutex wrapper contains:

#include <cyg/kernel/kapi.h>
#include <cyg/kernel/mutex.hxx>

-- 
Sergei.

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-03-21  9:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-21  0:45 [ECOS] eCos C++ API Paul D. DeRocco
2007-03-21  8:29 ` Andrew Lunn
2007-03-21  9:28 ` [ECOS] " Sergei Organov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).