libsysapi (project moved to edgemw
System level APIs to make systems programming simpler.
The library (as of now) provides the following features:
- Event based function calling mechanism with select
- Hash tables, Lists, Doubly linked list, Circular Queues, Stacks and Queues as simple but efficient API.
- File systems interface API, directory list, directory walk (dir in a dir), file read, simple ramfs and some file level API for general purpose file manipulation.
- Memory controller / accountant (A very simple and basic) that helps restrict your program's memory usage.
- Network device / interface handling API.
- Process file system (/proc) API for proc file manipulation for statistics / poll based monitoring applications.
- Time APIs (very basic and needs more work)
- Utilities: Printf (but colored output depending on the log level/ priority), daemonizing API (so that you don't have to remember how to setup a daemon), random number and string generators, tty and finding what arch you are running APIs.
- Basic Threadpools implementation. One thread per work only. Plans for moving to one thread doing multiple work and still supporting multiple threads doing multiples of work..
For more details about my future works.. please have a look at the TODO file in the repository.
The library only uses pthreads (the pthread support can be hidden via a macro but that disables the event looping).
When you are using this library use it with -lsysapi
and -pthread
option.
Please note that the library is "not" well tested and it is still in its pre-matured stage.