Threading in C, cross platform

后端 未结 8 1038
情话喂你
情话喂你 2021-02-05 14:40

I am dealing with an existing project (in C) that is currently running on a single thread, and we would like to run on multiple platforms AND have multiple threads. Hopefully, t

8条回答
  •  天涯浪人
    2021-02-05 15:06

    From my experience, multi threading in C for windows is heavily tied to Win32 APIs. Other languages like C# and JAVA supported by a framework also tie into these core libraries while offering their thread classes.

    However, I did find an openthreads API platform on sourceforge which might help you:

    http://openthreads.sourceforge.net/

    The API is modeled with respect to the Java and POSIX thread standard,

    I have not tried this myself as I currently do not have a need to support multiple platforms on my C/C++ projects.

提交回复
热议问题