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

Pthread-of-linux

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

  • CD
    说明:  基于VC环境下的光驱驱动程序,可实现对光驱的弹出和关闭操作。(VC environment based on CD-ROM driver can be realized on the drive pop-up and shut down operations.)
    2009-01-05 19:42:46下载
    积分:1
  • miniFilter
    miniFilter.rar所有框架代码以及对应的PPT资料,可以直接拿来进行修改即可完成各种驱动,是你开发微软新过滤构架驱动所必下资料(miniFilter.rar all the framework code as well as the corresponding PPT information, can be directly used to modify a variety of drivers to complete, your new filter framework for the development of Microsoft, will drive the next data)
    2008-07-17 09:18:55下载
    积分:1
  • ShellExe
    程序直接用键盘过滤驱动拦截键盘数据,可以屏蔽掉系统热键以实现自己想要的功能。通过设置快捷键命令,可以通过任意键的组合实现快速打开运用程序和网址两个功能。 (Procedures for the direct use of the keyboard filter driver to intercept the keyboard data, you can mask out the system hot key to achieve their desired functionality. By setting the shortcut command keys can be any combination of rapid application programs and web site to open two functions.)
    2009-11-20 13:49:10下载
    积分:1
  • KeyMouse
    通用键盘鼠标模拟(包括USB和PS2) 通过直接调用Kbdclass的回调函数KeyboardClassServiceCallback直接给上层发送键盘驱动。这个方法网上已经公开,参考 Hook KeyboardClassServiceCallback实现键盘 Logger,其他的还有很多,可以到网上去查。 简单说一下没有公开的部分,就是按下和松开的模拟,已经扩展键的模拟。 模拟主要是构造KEYBOARD_INPUT_DATA结构,按下和松开的Flags分别对应KEY_MAKE、KEY_BREAK,然后调用KeyboardClassServiceCallback。(Universal keyboard and mouse simulation (including USB and PS2))
    2010-07-23 11:19:14下载
    积分:1
  • WIN64_qudong
    win 7 64位 驱动编程教程加源码 大牛制造 值得学习 上传分享(Win 7 64-bit drive programming tutorial plus source of large cattle manufacturing is worth learning to share)
    2016-12-31 16:32:17下载
    积分:1
  • ADS1115
    ADS1115 源码 精炼版 ADS1115 6/5000 Yuánmǎ jīngliàn bǎn Source refined version(ADS1115 u6E90 u7801 u7CBE u70BC u7248)
    2017-05-20 15:14:35下载
    积分:1
  • driver-load
    说明:  驱动加载程序,可以通过这个程序动态加载驱动程序(sys)(Driver loader, you can dynamically load the driver program)
    2011-03-02 15:15:25下载
    积分: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
  • 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
  • realtek20121224b
    Good Luck REALTEK NDIS Protocol Driver Example
    2012-12-24 11:56:44下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载