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

Pthread-of-linux

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

  • xiflter_2.0
    NDIS HOOK实例,做防火墙比中间层驱动更稳定(NDIS HOOK example, than do the middle layer firewall driven more stable)
    2021-01-24 22:08:39下载
    积分:1
  • PCI9054_IO_Read_Write_Operation_Use_DriverStudio
    PCI9054实现IO读写操作 非常好 PCI9054实现IO读写操作 非常好(PCI9054 IO read and write operations to achieve very good)
    2011-01-13 14:22:09下载
    积分:1
  • FT232RL_DRIVER
    FT232RL 驱动程序,支持win7 64位使用。(Use FT232RL drivers, support Windows 7 64- bit.)
    2014-04-15 14:23:24下载
    积分:1
  • LCD_1602
    基于MSP430的LCD1602驱动程序,里面有写好了的h文件和c文件,添加到工程即可运用。(Based on LCD1602 MSP430 driver, there are written the h files and c file, adding to the engineering can be used.)
    2012-08-13 19:00:56下载
    积分: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
  • 113172250CAN
    can总线模块mcp2515的驱动开发程序源代码(can bus module mcp2515 driven development program source code)
    2012-05-22 11:17:04下载
    积分:1
  • CDROMControl
    vc 程序可以实现关盘时的刻录程序。。。绝对能用!赶紧下载吧(vc program can be closed when the disc burning program. . . Absolutely can! Quickly download it)
    2011-08-18 09:33:43下载
    积分:1
  • ROOTKIT
    rookit 编写 整理框架齐全,包括进程隐藏,文件隐藏,服务隐藏,注册表隐藏,端口隐藏等。各种隐藏方式,是学习rookit很好的资料(Rookit write complete finishing framework, including the hidden process, hidden files, hidden services, hidden registry port hidden. A variety of hidden learning rookit good information)
    2012-05-15 16:56:15下载
    积分:1
  • 20090311_e87c3416f74360b5c654JUkvxUbgTuPd
    可以实现文隐藏的源代码,利用驱动实现彻底隐藏文件(file hilde)
    2010-05-08 08:19:10下载
    积分:1
  • windows-file-filter-system-frame
    windows文件过滤驱动的入门介绍,以及框架说明,很好的参考示例(windows file system filter driver of introduction and description of the framework, a good reference sample)
    2011-04-19 14:30:18下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载