lib/kobject.c/** * kobject_init - initialize a kobject structure * @kobj: pointer to the kobject to initialize * @ktype: pointer to the ktype for this kobject. * * This function will properly initialize a kobject such that it can then * be passed to
fs/char_dev.c/** * __register_chrdev() - create and register a cdev occupying a range of minors * @major: major device number or 0 for dynamic allocation * @baseminor: first of the requested range of minor numbers * @count: the number of minor
/** * device_create - creates a device and registers it with sysfs * @class: pointer to the struct class that this device should be registered to * @parent: pointer to the parent struct device of this new device, if any * @devt: the dev_t for the
drivers/base/driver.c/** * driver_register - register driver with bus * @drv: driver to register * * We pass off most of the work to the bus_add_driver() call, * since most of the things we have to do deal with the bus * structures. */int
上2篇文章搞懂了parcelable和AIDL的使用,而在AIDL中使用parcelable時,也是差不多的,不過,parcelable也要寫成AIDL檔案:AIDL檔案如下:packeage com.*parcelable com.*.person 這個檔案不會產生一個.java檔案,.java檔案需要自己編寫:public class Person implements Parcelable{ private String name;private int age;private