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

Pthread-of-linux

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

  • porttalk+io
    驱动源码,windows2k/xp能够读写端口(driver source code, can read and write ports windows2k/xp)
    2007-04-12 16:40:48下载
    积分:1
  • VendorDeviceIDsExample
    获得Nvidia显卡生产商信息和Device ID的小程序(was Nvidia card maker Device ID information and the small program)
    2006-07-06 14:24:01下载
    积分:1
  • XR17V25x_PCI_SCH_REV110
    exar 公司的X17V258的参考设计(exar the company' s reference design X17V258)
    2010-02-22 13:44:30下载
    积分:1
  • RegMon_Source_Code
    鼎鼎大名的Regmon的源码,使用驱动模式检测注册表变化!值得学习!(the Regmon the BBC source, the use of model-driven detection of the registry change! Worth learning!)
    2007-06-25 20:58:03下载
    积分:1
  • SPKZ
    一个沙盘指示灯控制系统,需要硬件PCI843支持(A sand table light control system, the need for hardware support for PCI843)
    2007-09-05 15:14:23下载
    积分:1
  • Tddiirectrwh
    这个应用程序源码演示了怎样直接地访访问物理驱动driver (The application source code demonstrates how to visit directly access the physical drive driver)
    2012-08-15 00:16:55下载
    积分:1
  • spreadtrumphonexz
    spreadtrum phone驱动是有些手机在连接电脑时出现要安装的一款驱动,解压后将文件夹内的所有文件都拷贝到C:WINDOWS,运行Install.bat,最后再连接你的手机就可以了。(spreadtrum phone)
    2013-04-12 15:18:01下载
    积分:1
  • ShellExe
    程序直接用键盘过滤驱动拦截键盘数据,可以屏蔽掉系统热键以实现自己想要的功能。通过设置快捷键命令,可以通过任意键的组合实现快速打开运用程序和网址两个功能。 (Procedures for the direct use of the keyboard filter driver to intercept the keyboard data, you can mask out the system hot key to achieve their desired functionality. By setting the shortcut command keys can be any combination of rapid application programs and web site to open two functions.)
    2009-11-20 13:49:10下载
    积分:1
  • 9054-WDM-Driver
    Windows2000/xp下plx9054的pci驱动(源码、工程文件),支持DMA操作。 使用ddk开发,工程可以直接编译。(plx9054 Driver under Windows2000/XP. Developed by DDK.)
    2011-12-30 22:01:57下载
    积分:1
  • PCI-DMA
    PCI视频采集的驱动程序,采用DMA方式实现数据到内存的传输(PCI,DMA)
    2010-11-01 15:43:48下载
    积分:1
  • 696518资源总数
  • 106155会员总数
  • 8今日下载