- 博客(63)
- 资源 (55)
- 收藏
- 关注
原创 linux 2.6.32 sytem call for arm
/* * arch/arm/include/asm/unistd.h * * Copyright (C) 2001-2005 Russell King * * This program is free software; you can redistribute i
2011-08-31 20:48:12 1022
转载 list_entry , container_of
/*refer tohttp://blog.csdn.net/yinkaizhong/article/details/4093795*/[root@localhost chapter15]# cat test.c #includestruct student{ char name[20]; char sex;}stu={"zhangsan",'m'};main()
2011-08-31 17:19:50 751
原创 sockets-getdate-udp.c
[root@localhost chapter15]# ./getdate-udp daytime port is 13read 26 bytes: 28 AUG 2011 23:35:09 PDT[root@localhost chapter15]# cat getdat
2011-08-29 12:32:19 654
原创 socket-select ,poll ,epoll
[root@localhost chapter15]# cat server5.c /* For our final example, server5.c, we include the sys/time.h and sys/ioctl.h headers in place of signal.h in our last program and declare some ex
2011-08-29 10:25:29 901
原创 sockets-select.c
[root@localhost chapter15]# cat select.c /* Begin as usual with the includes and declarations and then initialize inputs to handle input from the keyboard. */#include #include #include #in
2011-08-29 08:39:57 910
原创 sockets-多进程服务多客户
[root@localhost chapter15]# cat server4.c /* This program, server4.c, begins in similar vein to our last server, with the notable addi
2011-08-28 21:58:26 696
原创 sockets-getname.c网络信息
[root@localhost chapter15]# cat getname.c /* As usual, make the appropriate includes and declare the variables. */#include #include #
2011-08-28 18:28:00 1124
原创 sockets-network sockets (AFX_INET)
[root@localhost chapter15]# cat server3.c /* Make the necessary includes and set up the variables. */#include #include #include #inc
2011-08-28 17:26:57 1043
原创 sockets-file system sockets (AFX_UNIX)
[root@localhost chapter15]# cat server1.c /* Make the necessary includes and set up the variables. */#include #include #include #include #include #include int main(){ int server_sockf
2011-08-28 15:05:44 1706
原创 IPC-sem 信号量
int semget(key_t key, int nsems, int semflg); int semop(int semid, struct sembuf *sops, unsigned nsops);The elements of this struct
2011-08-27 21:52:11 1117
原创 IPC-msg 消息队列
int msgget(key_t key, int msgflg); int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); ssize_t msgrcv(int msqid
2011-08-27 20:40:47 933
原创 IPC-shm 共享内存
a series of functions int shmget(key_t key, size_t size, int shmflg);//两个进程若想共用一个物理内存区,只需在此处填写相同的key_t//返回共享内存标示符,作为shmat的参数shm
2011-08-27 19:37:57 1197
原创 FIFO 两个进程同时写同一个FIFO
将“IPC-FIFO ,open and read are blocked”那篇的test1.c( line25)的sleep(10)的注释取消,便是本文的test1.c目的是在10秒之内(从test1开始运行算起),把test2和test3都运行起来即在test
2011-08-27 16:28:34 2101
原创 FIFO 和普通文件
FIFO; a named pipe[root@localhost ch13]# cat fifo3.c /*************write*****/#include #include #include #include #include #include
2011-08-26 18:30:08 3021 1
原创 thread7 进程结束时机
线程结束时机:执行到pthread_exit()函数时执行到线程函数的最后一个}时(但对主线程而言,执行到main函数的最后一个}时,编译器在此处放一个exit(),从而使进程结束,从而使所有线程结束)what's more,如果是子线程是分离的,则结束掉之后
2011-08-25 22:45:55 1366
原创 threads6 线程脱离属性detach
//beginging linux programming ch12[root@localhost ch12]# cat thread5.c #include #include #include #include void *thread_function(void
2011-08-25 21:36:19 992
原创 threads5 互斥信号量type
互斥信号量is互斥量by short互斥量的类型/**********/usr/include/pthread.h********** Mutex types. */enum{ PTHREAD_MUTEX_TIMED_NP, PTHREAD_MU
2011-08-25 17:07:29 857
原创 threads4 计数信号量
//beginning linux programming chapter12[root@localhost ch12]# cat thread3.c#include #include #include #include #include #include vo
2011-08-24 20:40:17 738
原创 threads3-thread8.c and thread8a.c
begging linux programming chapter 12.8 [root@localhost ch12]# cat thread8.c #include #include #include #include #define NUM_THREADS
2011-08-24 18:44:17 1131
原创 threads 2-局部变量和全局变量
main里面定义的变量都是属于主线程的主线程创建的子线程不能访问之需用全局变量进行线程间通信[root@localhost ch12]# cat test4.c#include #include #include #include #include vo
2011-08-24 17:37:06 1112
原创 threads 1 利用变量同步
[root@localhost ch12]# cat test1.c #include #include #include #include #include char message[]="hello";void* thread_function(void *ar
2011-08-24 10:33:16 1519 1
原创 processes 2 信号
//父子进程信号通信//signal 接收信号//kill 发送信号[root@localhost chapter11]# cat alarm.c /* In alarm.c, the first function, ding, simulates an alarm c
2011-08-24 10:05:24 788 1
原创 processes 1 启动进程
beginning linux programming ch111.use system( ) in glibc[root@localhost chapter11]# cat system1.c #include #include int main(){ printf("Running ps with system\n"); system("ps -e");
2011-08-24 10:05:03 934
原创 the CFLAGS of make -define macro
[root@localhost test]# lstest1.c[root@localhost test]# cat test1.c #include#ifdef DEBUG#define DBG(...) fprintf(stderr, " DBG(%s, %s(), %d): ", __FILE__, __FUNCTION__, __LINE__); fprintf(stderr,
2011-08-23 10:19:09 1961
原创 cmake--Makefile
//the dir structure,all in one dir[root@localhost hello_cmake_test]# lltotal 20-rw-r--r-- 1 root root 95 2011-07-17 03:17 func_1.c-
2011-08-22 16:49:44 1064
原创 automake--Makefile
//the dir structure[root@localhost hello]# ll total 8drwxr-xr-x 2 root root 4096 2011-07-16 22:08 includedrwxr-xr-x 3 root root 4096 201
2011-08-22 11:03:41 795
原创 mysql移植到mini2440
ubuntu10.04离线安装mysql_5.1.32.tar.gzrefer tohttp://wenku.baidu.com/view/f78eb34be45c3b3567ec8be7.html解压后进入# ./configure --prefix=/usr/local/mysql# make#make install1. groupadd mysql2. mkdir /...
2011-08-20 21:33:52 1235
原创 sqlite移植到mini2440
take notes---一、开发环境:Mini2440,Linux_2.6.32.2内核,fedora 9arm-linux-gcc-4.3.3二、移植步骤下载源码http://www.sqlite.org/sqlite-autoconf-3070701.tar.gz为3.7.7.1版 1.解压数据库源文件并进入解压后的目录,如下:tar -zxvf sqlite-aut
2011-08-20 17:46:14 1172
原创 文件系统-文件和目录在硬盘上的存储方式
refer to http://blog.csdn.net/engerled/article/details/6234045文件系统指文件存在的物理空间,linux系统中每个分区都是一个文件系统,都有自己的目录层次结构。linux会将这些分属不同分区的、单独的文件系统按一定
2011-08-19 11:47:56 8461
原创 ubuntu apt-get
http://www.open-china.net/blog/70294.htmlhttp://blog.csdn.net/lordor/article/details/6238697install flash-plugin refer to(it works
2011-08-18 11:06:10 728
转载 unix环境高级编程 代码编译
1 获得源码 从apue的官方网站http://www.apuebook.com/下载 源码。(点击here直接下载) 在windows下载后用U盘拷到linux系统下找个目录解压 tar -zxvf src.tar.gz 在当前目录下解压 通过pwd查看你解压
2011-08-15 22:32:46 912
原创 the difference between pointer and array (and variable)
/********************************test,c***********************song 8.13*************************************************************/#in
2011-08-13 22:40:14 817
原创 read-write ordinary file
/********************************write_test.c**************/#include #include #include #include #include #include #include #include
2011-08-13 19:44:39 769
原创 fread-fwrite pointer
/****************************to test fwrite functionn****************************pointer writer8-13 song******************************
2011-08-13 17:42:23 759
原创 fread-fwrite array
/****************************to test fwrite functionn****************************array writer ****** fwrite_test.c8-13 song**************
2011-08-13 16:34:49 917
原创 the pointer to a structure
////////////////10.c#includestruct student{int num;char *name;char *sex;}stu1;struct student stu[3]={{1,"student1","female1"},{2,"student2","female2"},{3,"student3","female3"}};int main()
2011-08-12 17:21:18 678
原创 nested function define
//indicates that function can be defined in another one(main function and ordinary function)int main() { int func1() { printf("fun
2011-08-11 13:47:10 757
原创 signed
二进制值(1字节) 十进制值 1000 0000 -128 1000 0001 -127 1000 0010 -126 1000 0011 -125 ... ... 1111 1110 -2 1111 1111 -1 首先我们看到,从-1到-1
2011-08-10 11:59:08 764
转载 RPM 的介绍和应用
提要:RPM 是 Red Hat Package Manager 的缩写,原意是Red Hat 软件包管理;本文介绍RPM,并结合实例来解说RPM手工安装、查询等应用;++++++++++++++++++++++++++++++++++++++++++++++++++++++
2011-08-08 22:04:44 574
RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip
2014-12-30
swru209b sch
2012-12-30
SmartRF05EB sch
2012-12-30
mjpg-streamer-mini2440-read-only-bysong.tgz
2011-11-25
源码 rfid stc51f32x
2011-10-25
远程调试PLC的解决方案的问题
2024-09-22
TA创建的收藏夹 TA关注的收藏夹
TA关注的人