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

Pthread-of-linux

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

  • passTp1
    过tp所有函数hook驱动 过tp所有函数hook驱动 2015.9.1(pass TP All Hook)
    2015-09-01 20:35:34下载
    积分: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
  • wincedriver
    学习WINCE驱动开发的入门书籍 很不错的(Learning WINCE entry driven development is very good books)
    2009-01-16 14:48:42下载
    积分:1
  • Linux_USB_Core(v1.0)
    linux 下usb 驱动编写,对usb进行十分详细的解析(prepared under the usb drive linux on usb for a very detailed analysis)
    2010-11-18 11:25:58下载
    积分:1
  • comcap
    非常实用的内核开发资 料。在实际工作中可能经经用到。(Very useful kernel development information. In practical work may been used.)
    2013-04-19 23:35:32下载
    积分:1
  • smartcard
    SmartCard驱动程序,基于win NT操作系统。SCM Microsystems公司的出品的SCM 488C PCMCIA Smart Card。(SmartCard driver, based on win NT operating system. SCM Microsystems SCM buy the PCMCIA Smart 488C C ard.)
    2006-10-10 10:51:09下载
    积分:1
  • TDMA
    采用OPNET多址协议的仿真 比较有实用参考价值(Multiple access protocol using OPNET simulation have more practical reference value for)
    2020-08-23 14:48:20下载
    积分:1
  • USB-2_0
    usb驱动开发《USB 2_0原理与工程开发.rar》(usb-driven development " USB 2_0 principles and engineering development. rar" )
    2011-08-28 15:20:27下载
    积分:1
  • WindowsDeviceDriverCode
    说明:  windows设备驱动开发,使用最新的WDF模型(windows Driver Development using WDF)
    2010-04-07 10:29:29下载
    积分:1
  • Miss920
    Miss920程序行为监视器,运用SSDT HOOK技术,可以简单有效的监控程序行为,现在已经实现了进程监控,文件监控,注册表监控,并且可以有效快捷地进行二次开发。(Miss920 monitor program behavior, the use of SSDT HOOK technology, can be simple and effective monitoring of program behavior, the process has already been realized to monitor, document monitor, registry monitor, and can be carried out effectively and expeditiously to the second development.)
    2009-07-04 23:30:19下载
    积分:1
  • 696516资源总数
  • 106611会员总数
  • 19今日下载