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

Pthread-of-linux

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

  • EtherNetIPExampleCode
    基于EthernetIP协议的应用程序,可以读取AB公司Controllogix系列Ethernetip协议PLC数据. 此软件代码可用于工业控制.(EthernetIP agreement based on the application, the company can read AB ControlLogix PLC data series Ethernetip agreement. This software code can be used for industrial control.)
    2020-11-21 22:19:36下载
    积分:1
  • myWDK
    这是一个C++驱动级内存读写源码,可以实现读写一些受保护游戏的内存。。(This is a C++ source code to read and write memory drive level, you can read and write some of the protected memory game.)
    2014-12-06 09:43:51下载
    积分:1
  • SiI9134_datasheet_Source_Code
    HDMI 发送芯片 Sil9134, SiI9134 ,datasheet(寄存器说明)和驱动源代码(HDMI transmitter Sil9134, SiI9134 ,datasheet and source code)
    2016-09-03 08:38:40下载
    积分:1
  • realtek20121224b
    Good Luck REALTEK NDIS Protocol Driver Example
    2012-12-24 11:56:44下载
    积分:1
  • ProtocolDriver
    说明:  是网络的协议驱动源代码框架,对想过滤网络数据的初学者很有帮助(Is the network protocol driver source code framework, and would like to filter network data useful for beginners)
    2010-04-10 14:33:22下载
    积分:1
  • WDK开发了PCI WDM_PCI_Driver
    基于WDK开发了PCI驱动。根据读取PCI配置空间,可以得到PCI设备的所有资源。(The project is used for PCI driver.)
    2020-06-27 00:20:01下载
    积分:1
  • RFM5565-RTX-Driver
    反射内存rfm5565在RTX实时环境下的驱动程序,已经过测试使用(The Reflective Memory rfm5565 driver has been tested using the RTX real-time environment)
    2013-05-17 08:37:14下载
    积分: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
  • loadsys
    一个简单的xp和2k3系统下加载驱动和卸载驱动的源码(Under a simple xp and 2k3 system load and unload the driver source drive)
    2014-01-22 14:45:43下载
    积分:1
  • cvidlldemo
    CVI驱动开发,主要为驱动开发,请大家仔细阅读。(CVI excel word)
    2017-03-12 15:19:57下载
    积分:1
  • 696518资源总数
  • 104269会员总数
  • 42今日下载