EmbeddedRelated.com
Forums

Seeking Operating System abstraction Layer

Started by Baron Samedi January 22, 2008
if I was taken
    to court. My mistress was an opium smoker, and she and her husband
    had awful quarrels, which made her bad-tempered, and then she
    would beat me for no reason. I used to get so tired working hard,
    and then she would beat me. She beat me with thick sticks of
    fire-wood. She would lay me on the bench, lift my clothes, and
    beat me on the back. Another day she would beat me thus with the
    fire tongs. One day she took a hot flat-iron, removed my clothes,
    and held it on my naked back until I howled with pain. (There
    was a large scab on her back from this burn when she came to the
    Mission.) The scars on my body are proof of my bad treatment. My
    forehead is all scars caused by her throwing heavy pieces of wood
    at my head. One cut a large gash, and the blood ran out. She
    stopped the bleeding and hid me away. She beat my legs one day
    until they were all swollen up. I thought I better get away before
    she killed me. When she was having her hair washed and dressed I
    ran away. I had heard of the Mission, and inquired the way and
    came to it. A white man brought me here. I am very happy now."
    While being brought to the Mission by this gentleman, she laid
    hold of his coat, and would not let go until she was safely
    inside. It is significant that in this case and the following,
    methods of punishment allowed e


"Baron Samedi" <Papa.Legba.666@gmail.com> wrote in message 
news:60bddd6e-3e04-4632-b37f-06687f8f38c5@e23g2000prf.googlegroups.com...
> hi, > > I am seeking an Operating System Abstraction Layer which will easily > let me port my code to Windows, Linux and VxWorks. It should > preferably be free, or at least cheap. > > After lots of goggling, the only thing that looks anywhere near it to > it is the old NASA OSAL, but that is incomplete and seems to be > abandoned (even email is bouncing) . > > Does anyone know of anything which fits the bill, or nearly so? Even > if it handles 2 out of 3, I suppose I could port the other. > > Any pointers to websites, books, etc. gratefully received., > > Thanks in advance for any help.
The nicest way to do this is to use a programming language that abstracts the machine. I have had excellent luck doing this with Ada. If you're dealing with real time constraints and are not building a GUI interface I think using Ada is a good way to go. If you want to build GUI's then I would suggest looking at C# or Java. If you're stuck with C, then I would suggest looking at Posix OS interface, which is supported to some degree by each of these systems. It's interesting that VxWorks is in the list when you are looking for something cheap. Another couple of acronyms you might try looking for for common interfaces are: RTEID and ORKID. Regards, Steve
On Jan 23, 4:57=A0am, Jack Scott <j...@jackscott.org> wrote:
> Why not use a high level programming language with ports to all those > platforms, such as Java? There's sure to be a language somewhere that > will do what you want. > > If you want it for a specific language (C, etc) you'll have to tell us > what language, and what sort of libraries you want to use. > > Jack > > > > Baron Samedi wrote: > > hi, > > > =A0 I am seeking an Operating System Abstraction Layer which will easily=
> > let me port my code to Windows, Linux and VxWorks. It should > > preferably be free, or at least cheap. > > > After lots of goggling, the only thing that looks anywhere near it to > > it is the old NASA OSAL, but that is incomplete and seems to be > > abandoned (even email is bouncing) . > > > Does anyone know of anything which fits the bill, or nearly so? Even > > if it handles 2 out of 3, I suppose I could port the other. > > > Any pointers to websites, books, etc. gratefully received., > > > Thanks in advance for any help.- Hide quoted text - > > - Show quoted text -
Good point, sorry. It's for C and C++
On Jan 23, 5:28=A0am, CBFalconer <cbfalco...@yahoo.com> wrote:
> Baron Samedi wrote: > > > I am seeking an Operating System Abstraction Layer which will > > easily let me port my code to Windows, Linux and VxWorks. It > > should preferably be free, or at least cheap. > > > After lots of goggling, the only thing that looks anywhere near > > it to it is the old NASA OSAL, but that is incomplete and seems > > to be abandoned (even email is bouncing) . > > > Does anyone know of anything which fits the bill, or nearly so? > > Even if it handles 2 out of 3, I suppose I could port the other. > > Try just programming in ISO standard C. =A0Some useful references > about C: > > =A0<http://c-faq.com/> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 =A0 =A0 =A0 (C-faq)
> =A0<http://benpfaff.org/writings/clc/off-topic.html> =A0 (comp.lang.c) > =A0<http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf> (C99) > =A0<http://cbfalconer.home.att.net/download/n869_txt.bz2> (C99, txt) > =A0<http://www.dinkumware.com/refxc.html> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(=
C-library}
> > The text version of N869 is the standard compressed by bzip2. =A0You > can discuss the language on comp.lang.c. > > -- > =A0[mail]: Chuck F (cbfalconer at maineline dot net) > =A0[page]: <http://cbfalconer.home.att.net> > =A0 =A0 =A0 =A0 =A0 =A0 Try the download section. > > -- > Posted via a free Usenet account fromhttp://www.teranews.com
The point is that the processes need to send and receive messages, plus lots morer o/s specific stuff. And windows, linux and vxworks all have different function calls to do that. So, an absctraction layer is needed. at it's simplest, it could just be something liek (not real code) #defin os_send-msg(x, y) \ #ifdef windows wm_send_msg(x, y) #else #ifdef linux .... etc of, course it is much more complex than that :-)
On Jan 23, 9:13=A0am, Gene S. Berkowitz <first.l...@verizon.net> wrote:
> In article <60bddd6e-3e04-4632-b37f-06687f8f3...@e23g2000prf.googlegroups.=
com>,
> Papa.Legba....@gmail.com says... > > > > > > > hi, > > > =A0 I am seeking an Operating System Abstraction Layer which will easily=
> > let me port my code to Windows, Linux and VxWorks. It should > > preferably be free, or at least cheap. > > > After lots of goggling, the only thing that looks anywhere near it to > > it is the old NASA OSAL, but that is incomplete and seems to be > > abandoned (even email is bouncing) . > > > Does anyone know of anything which fits the bill, or nearly so? Even > > if it handles 2 out of 3, I suppose I could port the other. > > > Any pointers to websites, books, etc. gratefully received., > > > Thanks in advance for any help. > > I think POSIX compliance is along the lines of what you're looking for. > > --Gene- Hide quoted text - > > - Show quoted text -
I woudl agree, but those three o/s are not all completely posix compliant :-(
On Jan 23, 9:37=A0am, "Rod Pemberton" <do_not_h...@nohavenot.cmm> wrote:
> "Jack Scott" <j...@jackscott.org> wrote in message > > news:MMslj.5978$421.3587@news-server.bigpond.net.au... > > > =A0[snipped Jack...] > > Baron Samedi wrote: > > > =A0 I am seeking an Operating System Abstraction Layer which will easi=
ly
> > > let me port my code to Windows, Linux and VxWorks. It should > > > preferably be free, or at least cheap. > > Have you looked at Simple DirectMedia Layer?http://www.libsdl.org/ > > SDL allows you to write your applications once. =A0It supports Linux, Wind=
ows,
> and many other unix and unix-like OSes (BSD, IRIX, Solaris, QNX). =A0But, =
I
> don't see VxWorks listed... =A0It was inteded for multimedia, but you can =
even
> write applications that approach OSes in complexity for it. =A0MAME, DOSBO=
X,
> and ScummVM have been ported to it. > > Wikipedia's description of SDL:http://en.wikipedia.org/wiki/Simple_DirectM=
edia_Layer
> > Rod Pemberton
Thanks, Rod. In a crunch, I could code the vxworks part myself, I guess. I will look into it.
On Jan 23, 10:18=A0pm, David Brown <da...@westcontrol.removethisbit.com>
wrote:
> Baron Samedi wrote: > > hi, > > > =A0 I am seeking an Operating System Abstraction Layer which will easily=
> > let me port my code to Windows, Linux and VxWorks. It should > > preferably be free, or at least cheap. > > > After lots of goggling, the only thing that looks anywhere near it to > > it is the old NASA OSAL, but that is incomplete and seems to be > > abandoned (even email is bouncing) . > > > Does anyone know of anything which fits the bill, or nearly so? Even > > if it handles 2 out of 3, I suppose I could port the other. > > > Any pointers to websites, books, etc. gratefully received., > > > Thanks in advance for any help. > > This depends entirely on the sort of OS services you want to use, and > the sort of system you are talking about. =A0If you want to use a gui, > look at something like wxWidgets, or SDL. =A0If your system is big enough,=
> look at a high-level language such as Python. =A0If you are doing C++ > programming, consider the boost libraries. =A0If you are doing unix-style > development, look at posix (windows is partly posix compliant, and can > be made more so with cygwin).- Hide quoted text - > > - Show quoted text -
Sorry, I should ahve said - it's embedded stuff. So, no gui, just message send/receive, task spawn/kill, timers, mutex, semepahore...
Baron Samedi wrote:
> On Jan 23, 10:18 pm, David Brown <da...@westcontrol.removethisbit.com> > wrote: >> Baron Samedi wrote: >>> hi, >>> I am seeking an Operating System Abstraction Layer which will easily >>> let me port my code to Windows, Linux and VxWorks. It should >>> preferably be free, or at least cheap. >>> After lots of goggling, the only thing that looks anywhere near it to >>> it is the old NASA OSAL, but that is incomplete and seems to be >>> abandoned (even email is bouncing) . >>> Does anyone know of anything which fits the bill, or nearly so? Even >>> if it handles 2 out of 3, I suppose I could port the other. >>> Any pointers to websites, books, etc. gratefully received., >>> Thanks in advance for any help. >> This depends entirely on the sort of OS services you want to use, and >> the sort of system you are talking about. If you want to use a gui, >> look at something like wxWidgets, or SDL. If your system is big enough, >> look at a high-level language such as Python. If you are doing C++ >> programming, consider the boost libraries. If you are doing unix-style >> development, look at posix (windows is partly posix compliant, and can >> be made more so with cygwin).- Hide quoted text - >> >> - Show quoted text - > > Sorry, I should ahve said - it's embedded stuff. So, no gui, just > message send/receive, task spawn/kill, timers, mutex, semepahore...
I thought it was probably embedded, and possibly real-time, given the newsgroups you posted to, but then you mentioned windows! Embedded systems are often connected to PC's to provide a non-critical gui, so it was worth checking. From what I've read from your other posts, it does sound like posix may be your best bet. Since posix is a standard, and everyone likes to implement different bits of standards in different ways, you'll have to find a common subset that is reasonably consistent across your OS's, but it could be a workable starting point.
On Wed, 23 Jan 2008 23:22:47 -0800 (PST), Baron Samedi
<Papa.Legba.666@gmail.com> wrote:

>On Jan 23, 9:13&#4294967295;am, Gene S. Berkowitz <first.l...@verizon.net> wrote: >> In article <60bddd6e-3e04-4632-b37f-06687f8f3...@e23g2000prf.googlegroups.com>, >> Papa.Legba....@gmail.com says...
>> > &#4294967295; I am seeking an Operating System Abstraction Layer which will easily >> > let me port my code to Windows, Linux and VxWorks. It should >> > preferably be free, or at least cheap.
>> I think POSIX compliance is along the lines of what you're looking for.
>I woudl agree, but those three o/s are not all completely posix >compliant :-(
Why would you expect that ? Take a look of some OS independent API, try to port it to all your required operating systems using their native primitives. If there are features that do not _readily_ map into _all_ OS platforms, just advice application programmers that these features should not be used if possible. Paul
Baron Samedi <Papa.Legba.666@gmail.com> writes:

> Sorry, I should ahve said - it's embedded stuff. So, no gui, just > message send/receive, task spawn/kill, timers, mutex, semepahore...
Then Ada would suit just fine -- we regularly port the same code base between Windows, Linux, Solaris, Mac OS X, VxWorks. All these can be had for free (with a bit of digging) bar VxWorks. A powerpc-wrs-vxworks compiler and support for GCC GNAT Ada is available at a cost which makes more sense if there are several of you and you need support. People like Green Hills, Aonix support VxWorks for fewer bucks. I believe a free GNAT is available for MaRTE OS, http://marte.unican.es/