- 博客(6)
- 资源 (215)
- 问答 (3)
- 收藏
- 关注
原创 C语言使用函数参数传递中的省略号:va_list, va_start, va_arg, va_end
首先要处理这种省略号的参数的话,需要包含头文件#include <stdarg.h>,然后利用下面的函数对“...”省略号变量进行处理。va_list arg;type va_arg( va_list arg, type );void va_end( va_list arg );void va_start( va_list arg, prev_param ); 下面实现...
2018-08-26 10:40:44 950
原创 C语言动态库libxxx.so的几种使用方法
首先先编写一个简单的函数func.h func.cfunc.h#ifndef _FUNC_H#define _FUNC_H#include <stdio.h>#include <stdlib.h>void fun(char *str);#endiffunc.c#include <func.h>void fun(char *...
2018-08-26 10:22:25 3304 1
原创 进程和线程模型
进程线程模型线程和进程的概念已经在操作系统书中被翻来覆去讲了很多遍。很多概念虽然都是套话,但没能理解透其中深意会导致很多内容理解不清晰。对于进程和线程的理解和把握可以说基本奠定了对系统的认知和把控能力。其核心意义绝不仅仅是“线程是调度的基本单位,进程是资源分配的基本单位”这么简单。多线程我们这里讨论的是用户态的多线程模型,同一个进程内部有多个线程,所有的线程共享同一个进程的内存空间,进...
2018-08-25 16:27:40 532 5
原创 进程间通信简介
进程间通信Linux几乎支持全部UNIX进程间通信方法,包括管道(有名管道和无名管道)、消息队列、共享内存、信号量和套接字。其中前四个属于同一台机器下进程间的通信,套接字则是用于网络通信。管道 无名管道 无名管道特点: 无名管道是一种特殊的文件,这种文件只存在于内存中。 无名管道只能用于父子进程或兄弟进程之间,必须用于具有亲缘关系的进程间...
2018-08-25 16:25:11 243
原创 网络I/O模型
网络I/O模型在描述这块内容的诸多书籍中,很多都只说笼统的概念,我们将问题具体化,暂时只考虑服务器端的网络I/O情形。我们假定目前的情形是服务器已经在监听用户请求,建立连接后服务器调用read()函数等待读取用户发送过来的数据流,之后将接收到的数据打印出来。所以服务器端简单是这样的流程:建立连接 -> 监听请求 -> 等待用户数据 -> 打印数据。我们总结网络通信中的等待...
2018-08-25 16:23:09 198
原创 Linux系统超全超实惠的命令行工具
Linux工具Linux下还是有很多超棒的开发工具的。在Linux日常使用中,最常用的命令自然是sudo, ls, cp, mv, cat等,但作为后台开发者,上述命令远远不够。从我的理解来看,合格的C/C++开发者至少需要从开发及调试工具、文件处理、性能分析、网络工具四个方面针对性使用一些开发工具。这里我罗列了一些,大部分都是开发中经常需要使用的命令,有些功能比较简单的命令我会给出一...
2018-08-25 16:19:54 297
C语言设计模式 PDF《C Design Pattern》
2024-04-17
C, GNUC GCC 预处理《The C Preprocessor》
2024-04-16
User Guide: Open Build Service
2022-05-13
CentOS Stream 9 nasm 安装包
2022-05-01
CentOS Stream 9 nasm 源码包
2022-05-01
Optimizing Linux Kernel with BOLT.pdf
2022-01-21
red_hat_enterprise_linux-8-customizing_anaconda-en-us.pdf
2022-01-18
cclinux-coreos-34.20211111.3.0-live.x86_64.iso
2021-11-11
Ftrace Kernel Hooks-More than just tracing.pdf
2021-10-22
cpumemory-What Every Programmer Should Know About Memory.pdf
2021-09-10
architecture-instruction-set-extensions-programming-reference
2021-09-10
System V Application Binary Interface - AMD64 Architecture
2021-09-10
Hidden Linux Metrics with Prometheus eBPF Exporter.pdf
2021-09-03
e2ap-v01.00.00.asn
2021-08-25
Intel 64 and IA-32 Architectures Software Developer’s Manual Combined
2021-07-07
谈谈你对Container Linux容器操作系统的理解
2021-11-14
Linux“实时补丁”导致CPU无法占满运行
2021-02-22
C语言如何将字符串“int”转化为int类型
2019-01-09
TA创建的收藏夹 TA关注的收藏夹
TA关注的人