Update REAMDE

This commit is contained in:
Joachim Nilsson committed 2013-08-06 02:15:41 +02:00
1 parent 0de9cb6321
commit 1b34da7a1a
1 file changed
+13 -11
+13 -11
View File
@@ -5,17 +5,17 @@ The libuev library is a small event library in the style of libevent,
the excellent libev and the venerable Xt(3) event loop. the excellent libev and the venerable Xt(3) event loop.
It is heavily modelled after the libev API, but will never be as It is heavily modelled after the libev API, but will never be as
portable or friendly to older systems. The focus of this project is portable to other UNIX systems. The primary target of this project is
modern embedded Linux systems, you will need kernel and C-library modern embedded Linux systems. You will need kernel and C-library
support for epoll(7) and timerfd. support for epoll(7), timerfd and signalfd.
Usage Usage
----- -----
Basically an event context is created to which timer and I/O stream The user initializes an event context to which timer and I/O stream
watchers are registered. After initial setup, the typical application watchers are registered. A typical application then enters the event
enters the event loop that will only return at program termination. loop that will only return at program termination.
The C API The C API
@@ -23,8 +23,8 @@ The C API
The typical application will do the following steps The typical application will do the following steps
1. Create the event context with `uev_ctx_create()` 1. Prepare an event context with `uev_init()`
2. Register callbacks with `uev_io_create()` and `uev_timer_create()` 2. Register callbacks with `uev_io_init()` and `uev_timer_init()`
3. Enter the event loop with `uev_run()` 3. Enter the event loop with `uev_run()`
**Note:** Make sure to use non-blocking stream I/O! **Note:** Make sure to use non-blocking stream I/O!
@@ -34,8 +34,8 @@ Build & Install
--------------- ---------------
The library is built and developed for GNU/Linux systems, as such it may The library is built and developed for GNU/Linux systems, as such it may
use GNU GCC and GNU Make specific features, but may also work with other use GNU GCC and GNU Make specific features. Patches to support *BSD
UNIX systems as well. kqueue are most welcome.
* `make all`: The library * `make all`: The library
* `make test`: Test and showcase * `make test`: Test and showcase
@@ -46,5 +46,7 @@ Warning
------- -------
Please be advised, libuev is not thread safe! It is primarily intended Please be advised, libuev is not thread safe! It is primarily intended
for use-cases where the engineed wants to avoid the use of threads. for use-cases where the engineer wants to avoid the use of threads. To
support threads the signal handling needs to be patched first, other
than that an event context per thread should be sufficient.