在线程C,跨平台 [英] Threading in C, cross platform

查看:154
本文介绍了在线程C,跨平台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我处理当前在单个线程运行的现有项目中(C),和我们想在多个平台上运行,并有多个线程。但愿,有一个这样的库,因为,恕我直言,在Win32 API就像是在眼睛戳重复自己。我知道Boost.Thread C ++的,但是,这必须是C(编译并在MinGW和海合会)。 Cygwin的是不是一种选择,对不起。

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, there is a library for this, because, IMHO, the Win32 API is like poking yourself in the eye repeatedly. I know about Boost.Thread for C++, but, this must be C (and compilable on MinGW and gcc). Cygwin is not an option, sorry.

推荐答案

尝试的OpenMP API ,它是多平台,你可以编译它与海湾合作委员会。

Try OpenMP API, it's multi-platform and you can compile it with GCC.

这篇关于在线程C,跨平台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆