我的站点

一个系统软件工程师的随手涂鸦

Date: 七月 27, 2016

Swarmkit笔记(2)——编译调试版本的程序

如果要编译安装debug版本的程序,可以使用下面命令:

# GO_GCFLAGS='-gcflags "-N -l"' make install

 

FreeBSD kernel 笔记(1)——什么是KLD?

下面内容选自 FreeBSD Device Drivers

A device driver can be either statically compiled into the system or dynamically loaded using a loadable kernel module (KLD).

NOTE: Most operating systems call a loadable kernel module an LKM—FreeBSD just had to be different.

A KLD is a kernel subsystem that can be loaded, unloaded, started, and stopped after bootup. In other words, a KLD can add functionality to the kernel and later remove said functionality while the system is running. Needless to say, our “functionality” will be device drivers.

In general, two components are common to all KLDs:
 A module event handler
 A DECLARE_MODULE macro call

 

Powered by WordPress & Theme by Anders Norén