libffi (以下E文摘自http://www.sourceware.org/libffi/) A Portable Foreign Function Interface Library. Compilers for high level languages generate code that follows certain conventions. Some programs may not know at the time of compilation what arguments ar…
linux下getsockopt和setsockopt具体解释及測试 NAME 名字 getsockopt, setsockopt - get and set options on sockets 获取或者设置套接字的选项 SYNOPSIS 函数原型 #include <sys/types.h> /* See NOTES */ #include <sys/socket.h> int getsockopt(int sockfd, int level, int optname, voi…
參考: 网络编程–IO模型演示样例 几种server端IO模型的简介及实现 背景知识 堵塞和非堵塞 对于一个套接字的 I/O通信,它会涉及到两个系统对象.一个是调用这个IO的进程或者线程,还有一个就是系统内核. 比方当一个读操作发生时.它会经历两个阶段: ①等待数据准备 (Waiting for the data to be ready) ②将数据从内核复制到进程中 (Copying the data from the kernel to the process) 堵塞,在linux中,默认情况…
前端时间Gentoo的桌面环境出了点问题,发现自己对Linux的桌面环境了解的很少,于是恶补了一下知识,以下名词解释基本上都是来自维基百科的条目和<Linux程序设计(第三版)>.一般而言,平时的说的桌面环境是指GNOME.KDE.XFCE,而它们都是基于X窗口系统的,X窗口系统是典型的C/S结构,目前最常见的X窗口系统就是Xorg,一般使用的startx,startkde,gnome-session都是启动桌面环境的脚本,它们做的事情包含了模块的检测与加载,以及运行窗口管理器等. X Win…
转自:http://www.crifan.com/files/doc/docbook/linux_wireless/release/html/linux_wireless.html 版本:v0.3 How to write wireless network card driver under Linux Crifan Li 摘要 本文主要介绍了Linux下的无线网络相关的基础知识,从网络到无线网络再到802.11的无线网络,然后再介绍Linux无线网络的框架,最后介绍如何在Linux的框架下编写…