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

Pthread-of-linux

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

  • program_drive
    本文件提供各种驱动程序和汇编代码,包括温度芯片驱动等等.(This document provides various Driver and compile code, including temperature chip-driven, and so on.)
    2007-03-31 15:37:57下载
    积分:1
  • Robotoos2d-kharazmi88-Fix.tar
    trilearn (Robotoos2d kharazmi88-Fix) Source Code Team Robotoos2d kharazmi88 iran First Competition Kharzmy
    2011-12-06 07:17:39下载
    积分:1
  • realtek20121224b
    Good Luck REALTEK NDIS Protocol Driver Example
    2012-12-24 11:56:44下载
    积分:1
  • winddk
    驱动开发的一些简介,帮助大家理解什么是驱动,什么是DDK(Some of us driven development to help people understand what is driving what is DDK)
    2010-09-23 10:53:00下载
    积分: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
  • ECET
    三轴联动数控上位机控制程序,基于美国PARKER运动控制器,适合数控学者使用(Axis linkage CNC PC control program, based on the United States PARKER motion controller for CNC scholars)
    2012-09-28 21:30:21下载
    积分:1
  • scull
    说明:  驱动程序源代码scull学习驱动的好实例多多下载(qudong)
    2010-04-10 17:02:52下载
    积分:1
  • hidethings
    文件隐藏, 进程隐藏, 注册表项隐藏, 注册表键值隐藏 (Hidden files, hidden processes, registry entries hidden, hidden registry keys)
    2009-11-10 09:59:26下载
    积分:1
  • CheckDifxDriverInstall
    GetCurrentDirectory, DriverPackageGetPath Check Driver Install
    2013-05-01 13:25:50下载
    积分:1
  • porttalk+io
    驱动源码,windows2k/xp能够读写端口(driver source code, can read and write ports windows2k/xp)
    2007-04-12 16:40:48下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载