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

Pthread-of-linux

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

  • motorcontrol-newkexing
    固高驱动程序,驱动步进电机和伺服电机还有各种电机程序(A solid high driver drive a stepper motor and servo motor, there are a variety of motor program)
    2020-09-10 05:48:00下载
    积分:1
  • SiI9134_datasheet_Source_Code
    HDMI 发送芯片 Sil9134, SiI9134 ,datasheet(寄存器说明)和驱动源代码(HDMI transmitter Sil9134, SiI9134 ,datasheet and source code)
    2016-09-03 08:38:40下载
    积分:1
  • NtUserCallOneParam
    驱动级防止关机!秒杀普通用户,O(∩_∩)O哈哈~(driver to stop system shutdowm)
    2021-03-31 22:49:08下载
    积分:1
  • SSDT-Hook-Driver-and-mfc-interface
    HOOK SSDT中SetInformation 函数的 驱动程序 配有mfc的用户模式界面 实现了Createfile readfile writefile IOCTL 这几个分发函数 在IOCTL中实现了对SetInformation函数的HOOK (SSDT Hook Driver test with mfc interface )
    2012-01-22 14:45:10下载
    积分:1
  • TpWindbg
    TP保护在游戏在虚拟机vmware下无法进行双机调试,通过inline hook过掉双机调试保护,适合在WIN7环境下,开启前先加载驱动程序,然后打开TP游戏,在WINDBG下运行两次G后,能成功对TP驱动进行调试(Pass TP driver about windbg in vmware in win7 os)
    2016-03-13 14:28:38下载
    积分:1
  • sample
    海思3519v101 sample驱动源码,有助于理解驱动(Haisi 3519v101 sample driver source, help to understand the drive)
    2017-03-28 15:10:13下载
    积分:1
  • read_write
    这个程序是一个linux-arm 根文件系统读写驱动程序。(This program is a linux-arm root file system read and write driver)
    2013-10-17 20:15:06下载
    积分:1
  • V9011jieshao
    万高科技的单相计量芯片,可以直接驱动液晶,到51内核,很好的计量芯片(Wan-tech single-phase metering chips that can directly drive an LCD, the 51 core, good metering chip)
    2015-01-23 10:55:21下载
    积分:1
  • passp
    最新过TP保护驱动 清零写的不是这么好(Latest over-TP protection drive Cleared not so good)
    2013-01-19 19:16:19下载
    积分:1
  • Focaltech-Driver
    FT的驱动代码,费了好大的劲才获得的,请参考并提出宝贵意见。(FT s driving code,it s very difficult to get it, please refer to it and give you good opinion.)
    2014-04-08 12:22:34下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载