This chapter mainly studies The call technology of Embedded Linux, which needs to be tested by various methods for complex Linux drivers and HAL libraries. Here are two things to know when writing a macro:
1. Variable-parameter macros
2.do{...} while (0)
After that, we learned the parameter definitions of 4 functions:
Proc-makedir
Name: virtual directory names
Parent: proc-dir-entry struct pointer for the parent directory of the virtual directory
Creat-proc-entry
Name: virtual file names
Mode: access permissions for virtual files
Parent: proc-dir-entry struct pointer to the parent directory of the virtual file
Cereat-proc-read-entry
Name: virtual file System
Mode: access permissions for virtual files
Base: The virtual file directory
Pro-dir-entry: struct pointer
read-proc-: A function pointer that handles read actions
Data: for the virtual file system
Remove-proce-entry:
Name: The names of the virtual files to be deleted
Parent: Virtual file parents directory
Proc-dir-entry: struct pointer
Linux kernel Debugging is considered difficult, and most people prefer to use the printk function to output debugging information and not to use various commands for debugging.
http://home.cnblogs.com/u/zivjeli/
Android Deep Exploration (Vol. 1) HAL and Driver Development Tenth Chapter summary