morphling.huang
既然选择了远方,便只顾风雨兼程。
摘要: 转:http://blog.csdn.net/yinkaizhong/article/details/4093795问题:如何通过结构中的某个变量获取结构本身的指针???关于container_of见kernel.h中:/*** container_of - cast a member of a structure out to the containing structure* @ptr: the pointer to the member.* @type: the type of the container struct this is embedded in.* @member: the 阅读全文
posted @ 2012-04-25 11:34 morphling.huang 阅读(682) 评论(0) 推荐(0) 编辑
摘要: http://www.bitscn.com/os/linux/200604/6978.html一、 什么是系统调用 在Linux的世界里,我们经常会遇到系统调用这一术语,所谓系统调用,就是内核提供的、功能十分强大的一系列的函数。这些系统调用是在内核中实现的,再通过一定的方式把系统调用给用户,一般都通过门(gate)陷入(trap)实现。系统调用是用户程序和内核交互的接口。 二、 系统调用的作用 系统调用在Linux系统中发挥着巨大的作用,如果没有系统调用,那么应用程序就失去了内核的支持。 我们在编程时用到的很多函数,如fork、open等这些函数最终都是在系统调用里实现... 阅读全文
posted @ 2012-04-25 00:05 morphling.huang 阅读(297) 评论(0) 推荐(0) 编辑