On 2012-01-11, daniele.g <> wrote:
> How? I mean: in Linux I can simply write:
>
> #include <pthread.h>
> ...
> pthread_create( ... );
>
> in OS20 I can't since it doesn't have them, so my idea is to make a
> conditional compiling using a macro. Am I right?
No.
A macro is a good choice if you can write a single thing which expands to
something suitable on each of your target systems. If you can't, you should
write a function for each system to provide the functionality.
The problem is that the conditional compilation doesn't do anything to solve
your actual *problem*, which is that if you don't spawn threads, the code
won't work. You need to rethink that part of the design...
-s
--
Copyright 2011, all wrongs reversed. Peter Seebach /
usenet-
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.