Porting from Win32 to Linux

Porting from Win32 to Linux

Post by RGTonki » Wed, 08 May 2002 20:53:47



Hi -

My company has been considering porting our existing win32 code base over to
Linux for some time and are now becoming serious about it, however, as is
typical with non programming types, the assumption is that it has already
been done and therefore should be fairly trivial....Those of us living in
reality know better.

Some code base particulars;
1. No GUI involved, embedded.
2. Heavily entrenched in EmbeddedNT, running as services.
3. Dependency:
    - Waitable timers [msec granular]
    - Kernel objects-> events, mutexes
    - Shared memory
    - I/O Completion ports, Overlapped I/O
    - IPC - shared memory
    - Winsock2 - WSA_
    - Filesystem
4. Not using the windows messaging system

I am getting up to speed on UNIX/Linux, however, detailed information
regarding what I'm up against in this port is not easily obtainable.  It
looks as though the WINE project is really the only migration project going
this direction, all other go from UNIX to Win32.  We looked at WINE several
months ago and found it to be unsuitable for a variety of reasons, like
performance and not all of the kernel features we use are/were implemented.

It is understood the threading and process models are different between the
OS's which dictates re-architect in several areas [signals, sleep(),
etc...].

Any assistance/suggestion/reference is greatly appreciated.

Thanks in advance,
RGT -

 
 
 

Porting from Win32 to Linux

Post by Alex Pavlof » Thu, 09 May 2002 01:56:03




Quote:>Some code base particulars;
>1. No GUI involved, embedded.

Not a problem.  Linux runs nicer without a GUI than Windows does.  

Quote:>2. Heavily entrenched in EmbeddedNT, running as services.

NT services are analogous to Linux services.   Not a major problem.

Quote:>3. Dependency:
>    - Waitable timers [msec granular]

As the other guy said, this'll take a little bit of work.  Compiling
the kernel is fairly easy.  If you're a programmer, you'll have no
problems.

Quote:>    - Kernel objects-> events, mutexes

Mutexes are present.  

Quote:>    - I/O Completion ports, Overlapped I/O

Not sure.

Quote:>    - Shared memory
>    - IPC - shared memory

Not a problem.  man shmget.

Quote:>    - Winsock2 - WSA_

I don't know how similar Winsock2 is to the linux implementation.

Quote:>    - Filesystem

What do you need?

Quote:>4. Not using the windows messaging system

It'll take some work to put together equivalent.

Check out the Common C++ project at
http://sourceforge.net/projects/cplusplus/.  While you may not use it,
it is a windows/linux toolkit that does contain some of the things
you're wondering about.  You can look then at how the different OSes
handle them.

 
 
 

Porting from Win32 to Linux

Post by el.. » Thu, 09 May 2002 03:06:34




Quote:>>    - Winsock2 - WSA_
>I don't know how similar Winsock2 is to the linux implementation.

It's pretty much the same (or was last time I looked).

--
http://www.spinics.net/linux/

 
 
 

Porting from Win32 to Linux

Post by yugam » Thu, 09 May 2002 06:54:49





>>    - Kernel objects-> events, mutexes

> Mutexes are present.

through LinuxThreads - read up on pthreads

Quote:>>    - I/O Completion ports, Overlapped I/O

> Not sure.

only in the experimental branch
 
 
 

Porting from Win32 to Linux

Post by David Schwart » Mon, 20 May 2002 16:11:23



> >    - Winsock2 - WSA_

> I don't know how similar Winsock2 is to the linux implementation.

        Different enough that if you case about networking performance, you
should write your network I/O separately for each platform.

        DS

 
 
 

1. Porting from Win32 to Linux

Hi -

My company has been considering porting our existing win32 code base over to
Linux for some time and are now becoming serious about it, however, as is
typical with non programming types, the assumption is that it has already
been done and therefore should be fairly trivial....Those of us living in
reality know better.

Some code base particulars;
1. No GUI involved, embedded.
2. Heavily entrenched in EmbeddedNT, running as services.
3. Dependency:
    - Waitable timers [msec granular]
    - Kernel objects-> events, mutexes
    - Shared memory
    - I/O Completion ports, Overlapped I/O
    - IPC - shared memory
    - Winsock2 - WSA_
    - Filesystem
4. Not using the windows messaging system

I am getting up to speed on UNIX/Linux, however, detailed information
regarding what I'm up against in this port is not easily obtainable.  It
looks as though the WINE project is really the only migration project going
this direction, all other go from UNIX to Win32.  We looked at WINE several
months ago and found it to be unsuitable for a variety of reasons, like
performance and not all of the kernel features we use are/were implemented.

It is understood the threading and process models are different between the
OS's which dictates re-architect in several areas [signals, sleep(),
etc...].

Any assistance/suggestion/reference is greatly appreciated.

Thanks in advance,
RGT -

2. Making a bootable CD

3. Linux damaging hardware through kernel patch????

4. Porting from Win32 services to Linux daemons

5. A "noecho" in shell scripts?

6. port win32 COM Server to linux CORBA server

7. Strange ipf-stuff

8. Linux newbie trying to port Win32 code

9. Porting Tool: GNU-WIN32 Version 18.1 B from Linux to Windows 95/NT

10. porting WIN32 to UNIX (Linux)

11. Porting Win32 app to Linux

12. Question of porting Win32 application to Linux