登录
首页 » Visual C++ » Pthread-of-linux

Pthread-of-linux

于 2011-12-08 发布 文件大小:10KB
0 342
下载积分: 1 下载次数: 9

代码说明:

  在linux环境下编写一个控制台应用程序,程序中有一个共享的整型变量shared_var,初始值为0;创建一个线程并使其立即与主线程并发执行。新创建的线程与主线程均不断地循环,并输出shared_var 的值。主线程在循环中不断地对shared_var 进行加1操作,即每次循环shared_var 被加1;而新创建的线程则不断地对shared_var 进行减1 操作,即每次循环shared_var 被减1。观察程序运行的结果,并对你看到的现象进行解释。(Written in the linux environment a console application, the program has a shared integer variable shared_var, the initial value of 0 create A thread and make it run concurrently with the main thread immediately. The newly created thread and main thread are constantly circulating, and the output shared_var Value. The main thread in a loop constantly on shared_var are incremented, that is plus 1 for each cycle shared_var and the new line created Process is constantly on the shared_var decremented, that is, each cycle shared_var is decreased by 1. Observe the results of running the program, and you To explain the phenomenon seen.)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • sys98
    说明:  98下的PCI驱动源代码!希望对各位有所帮助 只要稍微修改就可以成为2000的驱动了!(98 PCI driver source code! You want to help as long as it can be slightly modified to be driven by 2000!)
    2006-03-03 16:39:25下载
    积分:1
  • spreadtrumphonexz
    spreadtrum phone驱动是有些手机在连接电脑时出现要安装的一款驱动,解压后将文件夹内的所有文件都拷贝到C:WINDOWS,运行Install.bat,最后再连接你的手机就可以了。(spreadtrum phone)
    2013-04-12 15:18:01下载
    积分:1
  • 13594
    Separator Print Processor Sample
    2009-01-25 08:57:46下载
    积分:1
  • minusb
    USB driver code for windows nt........complete functionality
    2011-08-05 10:50:49下载
    积分:1
  • FT232RL_DRIVER
    FT232RL 驱动程序,支持win7 64位使用。(Use FT232RL drivers, support Windows 7 64- bit.)
    2014-04-15 14:23:24下载
    积分:1
  • Example
    epos 24/5控制器编程例子,非常方便学习和使用(A epos 24/5 programming examples with VB, which is very convenient to learn and use. )
    2013-01-26 17:31:50下载
    积分:1
  • Miss920
    Miss920程序行为监视器,运用SSDT HOOK技术,可以简单有效的监控程序行为,现在已经实现了进程监控,文件监控,注册表监控,并且可以有效快捷地进行二次开发。(Miss920 monitor program behavior, the use of SSDT HOOK technology, can be simple and effective monitoring of program behavior, the process has already been realized to monitor, document monitor, registry monitor, and can be carried out effectively and expeditiously to the second development.)
    2009-07-04 23:30:19下载
    积分:1
  • burn_code
    vc环境下编译的一个对USB设备进行烧录的驱动程序,高级一点的专业人士应该看一看。(vc environment compiled a USB device driver writers, senior professionals that should take a look at.)
    2008-08-14 16:47:52下载
    积分:1
  • yujinxiangqudongbanxuexibiji
    郁金香驱动班学习笔记,时时记录,可以帮助新学员快速掌握新知识(Tulip driver class study notes, from time to time records, can help new students quickly master new knowledge)
    2010-10-13 08:03:07下载
    积分:1
  • SysDriverLoad
    通过SCManager的一系列方法,实现了加载sys文件驱动的功能,安装到系统服务中。(Through a series of SCManager method to achieve a load sys file-driven functionality, install system services.)
    2014-03-21 15:54:27下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载