First, write Add. c In the VI editor.
# Include "test. H "# include int add (int A, int B) {return a + B;} int main () {printf ("2 + 3 = % d \ n", add (2, 3); printf ("5-3 = % d \ n", sub (5, 3); return 1 ;}
Then write the sub. c file:
#
1. directly use the Export command:# Export Path = $ path: custom pathCheck whether a port has been set. Run the Export command to view the Port:[Root @ localhost bin] # ExportPath = $ path: custom path2. Modify the profile file:#
Copyright NoticeRespect Original Works. Reprinted, please maintainArticleIntegrity, and the original author "tingsking18" and the main site address are indicated in the form of a hyperlink, so that other friends can ask and correct.
Download the
People are used to the following methods to express time: year, month, day, hour, minute, second, millisecond, week, etc. But in the kernel, for the sake of Software Logic andCodeIt uses different time Representation Methods and defines the
What is the difference between buffer and cache? Let's start with the free command.
Free
Compared with top, the free command provides a more concise view of the system memory usage:
$ Free
total used free shared buffers cached
Mem: 255268 23
I am afraid of losing it.
How SSH implements password-less Logon:
1. The asymmetric key is used, and the client SSH is used.ProgramGenerate a pair of keys (Public key file:
~ /. Ssh/id_rsa.pub
;
Private Key file:
~ /. Ssh/id_rsa
due to work needs in the past few days, I have pondered the multi-thread related information in Linux. In Linux, the most common multi-thread support library is the pthread library, which is part of the glibc library. However, there are very few
Thread Data Processing
Compared with a process, one of the biggest advantages of a thread is data sharing. Each process shares the data segment that follows the parent process to conveniently obtain and modify data. But this also brings many
Linux Crash Dump
File generation and use
Version 1.1:
2008-10-28
UnlikeWindowsProgramYou need to manually call related functions,LinuxProgramCrash Dump(CalledCore Dump) The file will crash in the program (suchSIGSEGV)
The latest ubuntu10.04 image loaded under VMware 7 will show unrecognized keyboard input. You cannot enter a password on the logon screen.
Solution:
(1) Account Opening screen keyboard function
Click the villain pattern in the lower right
1. Disable all input forward Output and only open it to some ports.The following is a command implementation:
Iptables-P input dropIptables-P forward dropIptables-P output drop
Run the command iptables-l-N to check whether the settings are
I. Design UDP Server
People usually use telephone connections to describe the TCP protocol, while UDP is often used as a metaphor by mail. Different from TCP-connected information transmission modes, UDP is considered to be a simple extension of
1. Linux entry and exitEnterLinux:You must enter your account. You can create the following two accounts during system installation:1. Root-Super User Account (System Administrator), which can be used to do anything in the system.2. Common
EchoCommand
The echo command is used to display a piece of text on the monitor, which generally serves as a prompt.
The general format of this command is Echo [-N] string.
Option n indicates that the output text does not wrap. Strings can be
Experiment 2 Linux programming Basics
I. Tutorial PurposeFamiliar with the C language programming method in Linux. By using the process control system calling function in programming, You can intuitively understand the concurrent execution of
3. Condition Variables
The previous section describes how to use mutex to share and communicate data between threads. One obvious drawback of mutex is that it has only two States: Lock and non-lock. Conditional variables make up for the lack of
Copyright Notice
Respect Original Works. Reprinted, please maintain the integrity of the article, and in the form of a hyperlink to indicate the original author "tingsking18" and the main site address, so that other friends can ask and correct.
1.4
Input_dev
.
The last step to input the device driver's initialization function is to callInput_register_deviceRegister a device. This function is shown in figureProgram list1. 9.
Program list 1.9Input_register_device
/* Driver/input.
As mentioned in the previous section, ASOC is divided into three parts: machine, platform, and CODEC. The machine driver is responsible for the coupling between platform and CODEC and the code specific to the part and device or board, rereference
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