1. read/write Functions
The READ function reads data from open devices or files.
# Include
Ssize_t read (int fd, void * Buf, size_t count );
Returned value: the number of bytes read successfully. If an error occurs,-1 is returned and errno
Copy others' logs ..
When I look at the kernel, I always encounter statements such as if (likely () {} Or if (unlikely (). I don't know what it means at first, so I want to introduce it.
Likely () and unlikely () are two macros defined in
This Nic has never been used before.
The simplification is complicated first. You can outline it and get a global view.
0, Introduction
1. Framework
2. Implementation
0, Introduction
The NIC device has a special position in Linux. Unlike
In Linux, touch command parameters are not commonly used. They may be used when you use make to modify the file timestamp or create a new file that does not exist, the following describes how to use the touch command parameters in Linux:
Touch
1. This book uses scull as an example to introduce the character device driver.Program.
Scull is a character device driver that operates the memory area.
2. Obtain, cancel, and register a device number.
@ Get the dev_t device number
The
Cause: the handle is used up.
This can be caused by the following situations:
1: The file handle is not closed, including common files, socket descriptors, and database connections.
2: although all handles are released, they are not manually
Searching for a file in a vast Linux environment is a terrible task. I have tried many methods. The simplest and most convenient method is to use the locate command with the updatedb command:
For example, we want to find a file with the "Chen"
Like message queues, the shared memory also has its own data structure, as shown below:
Struct shmid_ds {Struct ipc_perm shm_perm;/* ownership and permissions */Size_tShm_segsz;/* size of segment (bytes )*/Time_tShm_atime;/* Last attach time
I. How to capture signals in the kernel
If the signal processing is a user-defined function, this function is called when the signal is delivered. This function is called capture signal. Because the code of the signal processing function is in the
I. Separation and hierarchy of Driver Design
Hierarchical Design can improve code reusability. It uses the existing code to perform some overloading or modifications to complete the driver design.
In addition to hierarchical design, there are also
For Linux driver development, the understanding of the device model is fundamental. As the name suggests, the device model is about the device model. The concept of the device is the bus and the various devices connected to it.A device is connected
Today, I encountered a user question in the embedded Linux Group. The Chat record is as follows:
& Quot; zookeeper @ & (25716199) 14:35:42 how to get the make tool? & @ & (25716199) 14:36:02 is it a program in Linux or is it in a terminal? & @
Date: 2009.05.08
Content: file I/O
General description of available file I/O functions: open files, read files, write files, etc. file I/O generally includes five functions: Open/read/write/lseek/close
The function described in this section is often
Many people always ask this question, so here is a summary document for your reference.
Is the document originally in http://www.armjishu.com/bbs/viewtopic.php? Id = 158
Here, we must first describe that the following steps are for Linux systems and
Log on to xmanager on Linux as4
Xmanager is an easy-to-use high-performance X server software running on Windows platforms. It can seamlessly bring remote Unix/Linux desktops to your windows, even after your computer is on the Intranet or firewall,
View the time zone: # Cat/etc/sysconfig/clock
View System Time: # date
Modification date: # date-s 25/10/2012
Modification time: # date-s 21:45:36
Use the ntpdate command to automatically synchronize time. You can find the relevant
Apache concurrent connections and bandwidth control in LinuxThe stability, security, performance, and low price of Linux + Apache are gaining more and more market share. More and more friends are using Linux + Apache as website servers, while Apache
Detailed explanation of Linux fork-understand the collection # Include ;# Include ;
Main (){Pid_t PID;PID = fork ();
If (PID Printf ("error in fork! ");Else if (pid = 0)Printf ("I am the child process, my process ID is % d/N", getpid ());ElsePrintf (
Document directory
Release cache memory in Linux
Release cache memory in Linux
Careful friends will notice that when you frequently access files in Linux, the physical memory will soon be used up. When the program ends, the memory will not be
My testing machine has many problems. Previously, safe cannot be installed, and staf cannot be installed. Man cannot be used now ......
It turns out to be
Man man fgets: no such file or directory Error reading man
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service