Abstract A tool library in Linux

Source: Internet
Author: User

Open-source software is much more open-source software, and it is inevitable to have some ideas. A tool chain has been being abstracted. The slow development speed of C language should also be related to the low degree of code reuse. However, each software should have a series

Auxiliary Tools.

Below we will sort out the abstract content:

 

Log function: supports logging to syslog, file, and console.

Console functions: You can remotely log on to the system, set the log level, view the system running status at any time, and debug problems.

File Parsing: supports parsing configuration files, which are classified by directories and can be annotated.

Universal linked list: You can use a universal linked list instead of a self-reference in the C language structure. The linked list is subject to a lock, no lock, or a read/write lock.

Time Functions: encapsulate common time functions

String processing packaging: due to historical reasons, many string processing functions in C language are not very useful, including thread security and NULL pointer problems. At the same time, some string parsing functions are provided.

Database Engine Abstraction: Abstract Database Operation interfaces. You can register common database engines and use the client database provided by the database to perform specific operations. File Parsing is an implementation of this engine.

Thread encapsulation: encapsulate the pthread lib library, including the lock, read/write lock, condition variable, and attribute. The thread private data provided by the pthread lib library is used to implement thread security encapsulation.

Socket encapsulation: Socket System Call encapsulation, asynchronous mechanism encapsulation of poll, select epoll, kqueue, libevent is a good example.

Hash Table Implementation: implement container and large object access and search.

Simple Database: implements a single database. It only provides simple functions, relational databases, and permanent data access. Family/key can be used for reference in SQLite.

Memory Pool: in high-performance systems, the allocation and recovery of memory should all discard malloc. The out-of-the-box allocation policy is free, and the memory pool is the only way to go.

General task implementation: implements the task queue interface and processes the task queue.

 

This project is created on googlecode, where the code is hosted. Currently, only some functions are implemented.

Http://code.google.com/p/spider-tool/

 

 

 

 

 

 

 

 

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.