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

Pthread-of-linux

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

  • rc2
    采集声音信号并进行错位乘加求时延,进行处理来估计角度(Collecting acoustic signal and delay seeking dislocation multiply)
    2013-05-22 10:20:50下载
    积分:1
  • KeyBoardLog
    内核键盘记录工具,完美截取XX宝等密码,好用,使用(Kernel keylogger tool, a perfect treasure such as interception XX password, easy to use, use the)
    2020-07-01 09:00:02下载
    积分:1
  • scull
    说明:  驱动程序源代码scull学习驱动的好实例多多下载(qudong)
    2010-04-10 17:02:52下载
    积分:1
  • LPT_pr
    lpt_port driver scematic
    2014-07-14 21:50:53下载
    积分:1
  • CSCommTest
    说明:  串口驱动程序,在界面上能发送接收数据,主要是参照网上的教程实现的,代码能运行通过,是一个界面程序(Serial port driver, the interface can send receive data, mainly by reference to the realization of online tutorials, and code to run through, is an interface program)
    2008-12-08 09:41:19下载
    积分:1
  • STM32F107-USB_device-examples-1.0
    基于STM32f107的多种usb驱动和应用程序(STM32f107 multiple usb drive and applications)
    2012-12-14 18:02:42下载
    积分:1
  • FT232RL_DRIVER
    FT232RL 驱动程序,支持win7 64位使用。(Use FT232RL drivers, support Windows 7 64- bit.)
    2014-04-15 14:23:24下载
    积分:1
  • USB-Switch
    通过修改注册表实现USB接口的打开和禁用(USB interface s disable and open)
    2014-03-15 22:44:14下载
    积分:1
  • 7041831USBDriver
    仅用于tp900掌机的usb驱动。安装简单方便。-Only the usb driver for tp900 handheld. Easy to install.(Writing From the information carefully detailed features, including the content description (at least 20 words). Try not to let owners to spend time on your revised instructions. When extracting archive can not have a password.)
    2011-06-11 10:55:33下载
    积分:1
  • myspy
    迷你间谍程序,一个文件系统的过来驱动程序,侦听捕获所有的读写操作。(Mini spy program, a file system over the driver listens to catch all read and write operations.)
    2014-07-29 12:04:56下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载