shmread.c
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define ERR_EXIT(m) do { ...
分类:
其他好文 时间:
2014-05-23 08:21:49
阅读次数:
274
前面的一篇文章中简单的描述了一下内存映射的内容,http://blog.csdn.net/codectq/article/details/25658813,这篇文章作为用户把内存规划好之后,在用户空间使用IOCTL对设备进行控制时的常用函数的代码摘录。后续我会把这部分完善起来。
#ifdefCONFIG_MMU
externunsigned long __must_check __copy_f...
分类:
系统相关 时间:
2014-05-23 07:32:35
阅读次数:
424
用信号量实现进程互斥示例:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
union semun {
int ...
分类:
其他好文 时间:
2014-05-22 13:15:44
阅读次数:
231
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Tex...
分类:
其他好文 时间:
2014-05-22 12:36:05
阅读次数:
243
网上的N多教程全是Windows平台的,而Google官网是推荐用Ubuntu开发Android,很多朋友也是用Linux的系统开发的,下面我介绍下在Linux下Android开发环镜的搭建。
一、Linux 下安装配置 JDK
自从Oracle收购Sun近三年来,已经有很多变化。早在8月,甲骨文将“Operating System Distributor License f...
分类:
移动开发 时间:
2014-05-22 11:42:51
阅读次数:
406
8.5 日志
Logging模块提供了一些功能全面和灵活的日志系统。最简单的形式就是把日志信息发送到一个文件或sys.stderr;
import logging
logging.debug(’Debugging information’)
logging.info(’Informational message’)
logging.warning(’Warning:config file...
分类:
编程语言 时间:
2014-05-22 10:45:11
阅读次数:
379
1.查看linux详细版本信息 file /sbin/init2.下载对应nmon版本http://pkgs.repoforge.org/nmon/3.安装rpm -ivhnmon-14f-1.el5.rf.i386.rpm4.采集数据1)./nmon_x86_rhel52 -s10 -c60-f -m .-s10 每 10 秒采集一次数据 ......
分类:
系统相关 时间:
2014-05-22 09:36:32
阅读次数:
287
命令历史
以:和/开头的命令都有历史纪录,可以首先键入:或/然后按上下箭头来选择某个历史命令。
启动vim
在命令行窗口中输入以下命令即可
vim 直接启动vim
vim filename 打开vim并创建名为filename的文件
文件命令
打开单个文件
vim file...
分类:
其他好文 时间:
2014-05-22 09:25:43
阅读次数:
215
<!--
Copyright 2011 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the L...
分类:
移动开发 时间:
2014-05-22 08:41:44
阅读次数:
377
信号量和P、V原语由Dijkstra(迪杰斯特拉)提出
信号量
互斥:P、V在同一个进程中
同步:P、V在不同进程中
信号量值含义
S>0:S表示可用资源的个数
S=0:表示无可用资源,无等待进程
S
信号量
struct semaphore
{
int value;
pointer_PCB queue;
}
P原语
P(s)
...
分类:
其他好文 时间:
2014-05-22 07:01:59
阅读次数:
319