First, prevent PRINTK function to reduce Linux drive performance
Extensive use of the PRINTK function to frequently manipulate log files or console device files can severely affect Linux drive performance (because the speed of writing disks is far from read and write memory), so it is required that the Linux driver use the PRINTK function to output information only during the development phase and remove it when it is officially released.
The PRINTK function displays messages in the console via the/dev/console device file, which functions only under the console of the character interface, so the PRINTK function is only used on the console of the character interface to output messages normally.
The difference between a variadic macro and a fixed-parameter macro is that a mutable parameter macro needs to get variable parameters for a variable parameter macro through the _va_args macro. _va_args macros do not support cases where the number of variable parameters is 0.
Ii. data interaction through a virtual file system (/PROC)
/proc is a virtual file system whose read and write operations are read and write to memory, read and write faster than the/dev file system, so it can be used as a tool for Linux to interact with user-space programs.
The current system's memory resources are obtained through the/proc/meminfo file. The action handler for the virtual file in the read-write directory is set by the Proc_dir_entry.read_proc and proc_dir_entry.read_write function pointers, and the Proc_dir_entry struct represents a virtual directory or file.
The read and write of a Linux file is determined by the properties, which can be represented in octal. Before deleting a virtual directory, delete the virtual files in the virtual directory.
Iii. 3 invocation formats for the list command
List, list_, and list n three formats, first displaying the code using the List command. Executing the above command will enter the GDB console and then execute the associated command to connect to the Android emulator.
Tenth Chapter Essays