在MinGW的螺纹C程序 [英] Threaded C programs in minGW

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

问题描述

我创建拦截所有的数据包时的某些链路中断的程序。我需要实现的嗅探器和链接检查的线程。但MinGW的没有pthreads的。

I am creating a program that intercepts all packets when a certain link is down. I would need to implement the sniffer and the link-checker as threads. But minGW does not have pthreads.

如何在MinGW的实现线程?

How do you implement threads in minGW?

编辑:答案

HTTP://www.$c$cproject.com/KB/线程/ sync.aspx

维韦克戈埃尔使我这个(_beginthread)。这两个例子汇编code ::块/ MinGW的!

Vivek Goel led me to this (_beginthread). Both examples compile on Code::blocks/minGW!

推荐答案

您必须使用
WIN 32线程API见
http://www.mingw.org/wiki/Use_the_thread_library
http://msdn.microsoft.com/en-us/library/ms684254(v = vs.85)的.aspx

You have to use WIN 32 Threads API see http://www.mingw.org/wiki/Use_the_thread_library http://msdn.microsoft.com/en-us/library/ms684254(v=vs.85).aspx

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

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