- 博客(18)
- 资源 (61)
- 收藏
- 关注
转载 磁盘为什么要格式化
磁盘为什么要格式化 -------------------------------------------------------------------------------- 作者:汉花唐落 来源:易通网络 类别:硬件文库--计算机组装与维修 我们知道,硬盘和软盘都必须格式化后才能使用,这是因为各种操作系统都必须按照一定的方式来管理磁盘,而只有格式化才能使磁盘的结
2011-10-30 21:42:26 3158
转载 linux Linux常见特殊符号 重定向符号
Linux中高级I/O 重定向的符号及其用法 符号 意义 n>&m 将FD为m的输出复制到FD为n的文件中 n 将FD为m的输入复制到FD为n的文件中 n>&- 关闭FD为n的输出 n 关闭FD为n的输入 &>file 将标
2011-10-30 21:20:58 9877
转载 select 函数详解
在Linux中,我们可以使用 select 函数实现I/O端口的复用,传递给 select 函数的参数会告诉内核: • 我们所关心的文件描述符 • 对每个描述符,我们所关心的状态。(我们是要想从一个文件描述符中读或者写,还是关注一个描述符中是否出现异常) • 我们要等待多长时间。(我们可以等待无限长的时间,等待固定的一段时间,或者根本就不等待)
2011-10-30 20:30:18 1021
转载 80x86的保护虚地址模式
在保护模式下,80x86支持虚拟存储器的功能,一个任务可运行多达16KB个段,每个段最大可为4GB,故一个任务最大可达64T的虚拟地址。保护模式下运行的程序分为4个特权等级:0、1、2、3,操作系统核心运行在最高特权等级0;用户程序运行在最低特权等级3。 80x86中有完善的特权检查机制,既能实现资源共享,又能保证程序和数据的安全和保密、任务之间的隔离。 保护虚地址模式下的寻址 与实
2011-10-30 10:05:11 1221
转载 GCC 嵌入式汇编
2.6.3 Gcc嵌入式汇编 在Linux的源代码中,有很多C语言的函数中嵌入一段汇编语言程序段,这就是gcc提供的“asm”功能,例如在include/asm-i386/system.h中定义的,读控制寄存器CR0的一个宏read_cr0(): #define read_cr0() ({ unsigned int __dummy;
2011-10-29 09:40:25 628
转载 嵌入式汇编的基本格式
本节是第一次在内核源程序中接触到C语言中的嵌入式汇编代码。由于我们在通常的C语言程序的编制过程中一般是不会使用嵌入式汇编程序的,因此这里有必要对其基本格式进行简单的描述,详细的说明可参见GNU gcc手册中[5]第4章的内容(Extensions to the C LanguageFamily),或见参考文献[20](Using Inline Assembly with gcc)。 具有
2011-10-29 09:37:59 702
转载 Linux fcntl函数详解
http://blog.csdn.net/s_k_yliu/article/details/6642635 功能描述:根据文件描述词来操作文件的特性。 #include #include int fcntl(int fd, int cmd); int fcntl(int fd, int cmd, long arg); int fcntl(int fd, int cmd, struc
2011-10-28 20:12:36 579
转载 htons函数详解:网络与主机字节转换函数:(s 就是short l是long h是host n是network)
http://blog.csdn.net/libuding/article/details/5860578 Part 1: htons函数具体解释 在Linux和Windows网络编程时需要用到htons和htonl函数,用来将主机字节顺序转换为网络字节顺序。 在Intel机器下,执行以下程序 int main() ...{ printf("%d /n"
2011-10-28 19:57:19 916
转载 Are You a Good Leader or a Bad Leader
Leadership is probably one of the most talked about business concepts, but the least understood. Leadership is about getting things done and helping people reach their potential. My experience has sho
2011-10-27 22:08:49 689
转载 Linux下的多线程编程
本文出自:http://www.china-pub.com 作者: 姚继锋 (2001-08-11 09:05:00) 1 引言 线程(thread)技术早在60年代就被提出,但真正应用多线程到操作系统中去,是在80年代中期,solaris是这方面的佼佼者。传统的Unix也支持线程的概念,但是在一个进程(process)中只允许有一个线程,这样多线程就意味着多进程。现在,多线程技术已经被
2011-10-27 19:08:44 287
转载 把字符串转换成整数
http://blog.csdn.net/sandflee/article/details/3905690#comments 题目:输入一个表示整数的字符串,把该字符串转换成整数并输出。例如输入字符串"345",则输出整数345。 分析:这道题尽管不是很难,学过C/C++语言一般都能实现基本功能,但不同程序员就这道题写出的代码有很大区别,可以说这道题能够很好地反应出程序员的思维和编程习惯,因
2011-10-27 19:05:39 529
转载 关于getc
在linux标准函数里面,在stdio.h里面我们可以看到: /* The C standard explicitly says this is a macro, so we always do the optimization for it. */ #define getc(_fp) _IO_getc (_fp) 关于getc的宏定义,从这里可以告诉我们一个道理我们可以借助g
2011-10-26 22:35:32 1912 1
原创 Linux C 编程一站式学习 第25章 C标准库 综合练习二题解 文件格式转换
/************************************************** test.ini file is: ;Configuration of http [http] domain=www.mysite.com port=8080 cgihome=/cgi-bin ;Configuration of db [database] serv
2011-10-26 20:52:20 485
原创 记录系统当前时间到一个文件中
/************************************************** ****************************************************/ #include #include #include #include void record_systime(void) { FILE *fp = NUL
2011-10-25 20:37:42 455
原创 删除字符串中多余的空格 shrink_space
/********************************************************************* NAME shrink_space - shrink one or more space to one space. SYNOPSIS char *shrink_space(char *dest, char const
2011-10-24 18:46:29 445
转载 Advice to Youth
Advice to Youth Being told I would be expected to talk here, I inquired what sort of talk I ought to make. They said it should be something suitable to youth-something didactic, instructive, or
2011-10-23 22:59:52 836
原创 c语言 strtok strtok_r的一种实现
#include #include char * strtok1(char *str, const char *delim) { char *p = NULL; char *pd = NULL; static char *ps = NULL; char flag = 0; //if ps not point to the last of
2011-10-23 12:11:18 751
转载 按位反转字符问题
按位反转字符问题 Write a C function to swap the bits of a unsigned char so that its bits become the mirror image of the char. MSBs become its LS
2011-10-13 21:48:17 1105
Introduction to Java Programming Comprehensive Version Fifth Edition
2012-02-18
Fusion 基础简介
2012-02-02
DirectFB 原码导读
2012-01-31
KernelAnalysis−HOWTO
2012-01-11
第七讲 内核空间和用户空间
2012-01-11
linux 内存寻址
2012-01-11
Linux中的汇编语言
2012-01-09
TN05.ELF.Format.Summary.pdf
2012-01-06
使用wireshark 解析rtp流.7z
2021-09-21
各种函数零点问题的处理
2017-12-10
electric fence
2016-04-05
Embedded Linux System Design and Development Source code
2013-09-05
<<Programming from the Ground Up>> by Jonathan Bartlett
2013-04-03
Memory Mapping and DMA.pdf
2012-05-23
linux frame buffer 学习资料
2012-05-19
nweb: a tiny, safe Web server (static pages only)
2012-04-22
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人