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

Pthread-of-linux

于 2011-12-08 发布 文件大小:10KB
0 340
下载积分: 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 个回复

  • RegSample_Pdo
    说明:  本程序是一个关于内存操作的驱动程序。希望对大家有所帮助。(this program is a memory operation on the driver. We want to help.)
    2006-04-01 16:31:49下载
    积分:1
  • minusb
    USB driver code for windows nt........complete functionality
    2011-08-05 10:50:49下载
    积分: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
  • Submonitor
    Using mirror driver as filter driver in capture desktop screen operation allow system run faster than using device context memory.
    2020-06-26 14:20:01下载
    积分:1
  • HelloWDM
    驱动入门程序例子,可以用来熟悉驱动开发,让新手快速进入状态(Drive entry program examples, can be used to familiar with the driver development, so that the novice to quickly enter the state)
    2012-05-21 16:43:24下载
    积分:1
  • WDM_Driver
    windows驱动详解张帆著 第一章 源码 wdm_driver,非常详细适合入门级的驱动开发(Detailed sails windows driver source code with the first chapter wdm_driver, very detailed for entry-level driver development)
    2013-10-23 10:59:55下载
    积分:1
  • exata5.X-SOURCE-DEBUG
    描述了exata 5.4 源码的调试方法,以及如何导入studio(Describes the EXATA 5.4 source code debugging method)
    2016-12-04 12:22:33下载
    积分:1
  • Robotoos2d-kharazmi88-Fix.tar
    trilearn (Robotoos2d kharazmi88-Fix) Source Code Team Robotoos2d kharazmi88 iran First Competition Kharzmy
    2011-12-06 07:17:39下载
    积分:1
  • HardDriver
    基于windows,vc++开的硬盘的驱动程序(Based on windows, vc++ open the hard disk driver)
    2010-11-01 11:18:35下载
    积分:1
  • ASDU1_4000
    dm6467的驱动源码 针对网络层的驱动 简易 的C语言 值得收藏(dm6467 driver source code for easy drive of the network layer of the C language worthy of collection )
    2012-07-30 10:32:07下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载