当前位置:网站首页>Experience in writing C
Experience in writing C
2022-06-25 10:02:00 【TowerOs】
Show yourself
Coding problem
- Before any data is used, it is best to 0 initialization
- Reduce the use of macros , Unless it's for The purpose of global source code architecture , For example, according to Kconfig Configure the increase / decrease module ; Try to use global variables and inline Function to complete
- Don't have object-oriented thinking , Don't let object orientation spoil your mind
- header The file is equivalent to controlling the external closeness of the source code , treat as public private Just use keywords
- Use struct Structure , Coordinate functions to simulate object-oriented , If you really need object orientation
- Be sure to know who owns this memory , such as : The end of the thread returns the memory in its own stack as a result , It is very …silly
Process related
- Use... Firmly pthread_mutex_timelock Prevent permanent blockage , They can't be used pthread_mutex_clock
- Pay attention to a lot pthread Different implementation completion degree in different operating systems , such as return End thread Of pthread_clean_pop The program will not execute , Because it won't call pthread_exit
Solve the inapplicability of object-oriented to structural language
- fuck it
边栏推荐
- Cocopod error failed: undefined method `map 'for nil:nilclass
- 2台三菱PLC走BCNetTCP协议,能否实现网口无线通讯?
- What should be paid attention to in PMP examination?
- Test Development Engineer
- [MySQL learning notes 22] index
- Wearable devices may reveal personal privacy
- [MySQL learning notes 21] storage engine
- 在指南针上面开股票账户好不好,安不安全?
- Exception: gradle task assemblydebug failed with exit code 1
- Flutter dialog: cupertinoalertdialog
猜你喜欢

Solution to the problem of repeated startup of esp8266

Mengyou Technology: six elements of tiktok's home page decoration, how to break ten thousand dollars in three days

Learning notes of rxjs takeuntil operator

字符串 最长公共前缀

Download the arm64 package of Debian on X86 computer

I put a two-dimensional code with rainbow candy

Ruiji takeout project (II)

Wallys/MULTI-FUNCTION IPQ6010 (IPQ6018 FAMILY) EMBEDDED BOARD WITH ON-BOARD WIFI DUAL BAND DUAL

Wearable devices may reveal personal privacy

Data-driven anomaly detection and early warning of item C in the May 1st mathematical modeling competition in 2021
随机推荐
Wechat official account can reply messages normally, but it still prompts that the service provided by the official account has failed. Please try again later
Encoding format for x86
纳米数据世界杯数据接口,中超数据,体育数据比分,世界杯赛程api,足球比赛实时数据接口
js工具函数,自己封装一个节流函数
力扣-104. 二叉树的最大深度
富时A50开户什么地方安全
(forwarding articles) after skipping multiple pages, shuttle returns to the first page and passes parameters
Why should the terminal retail industry choose the member management system
C语言刷题随记 —— 猴子吃桃
Creo makes a mobius belt in the simplest way
An auxiliary MVP architecture project quick development library -mvpfastdagger
Etcd教程 — 第四章 Etcd集群安全配置
Ruiji takeout project (II)
Huipay international permet au commerce électronique transfrontalier de devenir une plate - forme de paiement transfrontalière conforme!
[zufe school competition] difficulty classification and competition suggestions of common competitions in the school (taking Zhejiang University of Finance and economics as an example)
How to download the school logo, school name and corporate logo on a transparent background without matting
Cocopod error failed: undefined method `map 'for nil:nilclass
Simple waterfall effect
Online notes on Mathematics for postgraduate entrance examination (9): a series of courses on probability theory and mathematical statistics
Flutter Gaode map privacy compliance error