mirror of
https://github.com/troglobit/libuev.git
synced 2026-12-05 22:18:40 +00:00
Updates and cleanup of README
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
7d6d90cdb1
commit
bf127b0dab
1 file changed
+11
-27
@@ -116,13 +116,13 @@ is achieved by calling `uev_init()` with a pointer to a (thread) local
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Register an Event Watcher
|
### Register an Event Watcher
|
||||||
|
|
||||||
For each event to be monitored, be it a signal, timer or a file
|
For each event to monitor, be it a signal, timer or file descriptor, a
|
||||||
descriptor, a *watcher* must be registered with the event context. The
|
*watcher* must be registered with the event context. The watcher, an
|
||||||
watcher, an `uev_t`, is registered by calling the event type's `_init()`
|
`uev_t`, is registered by calling the event type's `_init()` function
|
||||||
function with the `uev_ctx_t` context, the callback, and an optional
|
with the `uev_ctx_t` context, the callback, and an optional argument.
|
||||||
argument.
|
|
||||||
|
|
||||||
Here is a signal example:
|
Here is a signal example:
|
||||||
|
|
||||||
@@ -148,6 +148,7 @@ Here is a signal example:
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Start Event Loop
|
### Start Event Loop
|
||||||
|
|
||||||
When all watchers are registered, call the *event loop* with `uev_run()`
|
When all watchers are registered, call the *event loop* with `uev_run()`
|
||||||
@@ -275,38 +276,21 @@ Build & Install
|
|||||||
The library is built for and developed on GNU/Linux systems, patches to
|
The library is built for and developed on GNU/Linux systems, patches to
|
||||||
support *BSD and its kqueue interface are most welcome.
|
support *BSD and its kqueue interface are most welcome.
|
||||||
|
|
||||||
libuEv use the de facto standard GNU configure and build system. Use
|
libuEv use the GNU configure and build system. To try out the bundled
|
||||||
the `--enable-examples` switch to to the `configure` to test the bundled
|
examples, use the `--enable-examples` switch to the `configure` script.
|
||||||
examples, which are disabled by default.
|
|
||||||
|
|
||||||
./configure
|
./configure
|
||||||
make all
|
make all
|
||||||
make test
|
make test
|
||||||
make install
|
make install
|
||||||
|
|
||||||
Size of [libuEv][]:
|
The resulting .so file is ~14 kiB when stripped (`make install-strip`).
|
||||||
|
|
||||||
$ make strip
|
|
||||||
CC main.o
|
|
||||||
CC io.o
|
|
||||||
CC timer.o
|
|
||||||
CC signal.o
|
|
||||||
ARCHIVE libuev.a
|
|
||||||
LINK libuev.so.1
|
|
||||||
STRIP libuev.a
|
|
||||||
STRIP libuev.so.1
|
|
||||||
text data bss dec hex filename
|
|
||||||
1177 0 0 1177 499 main.o (ex libuev.a)
|
|
||||||
308 0 0 308 134 io.o (ex libuev.a)
|
|
||||||
682 0 0 682 2aa timer.o (ex libuev.a)
|
|
||||||
563 0 0 563 233 signal.o (ex libuev.a)
|
|
||||||
6306 768 8 7082 1baa libuev.so.1
|
|
||||||
|
|
||||||
|
|
||||||
Origin & References
|
Origin & References
|
||||||
--------------------
|
-------------------
|
||||||
|
|
||||||
[libuEv][] was originally based on [LibUEvent][8] by [Flemming Madsen]
|
[libuEv][] was originally based on [LibUEvent][8] by [Flemming Madsen][]
|
||||||
but has been completely rewritten with a much clearer API. Now more
|
but has been completely rewritten with a much clearer API. Now more
|
||||||
similar to the famous [libev][2] by [Mark Lehmann][]. Another small
|
similar to the famous [libev][2] by [Mark Lehmann][]. Another small
|
||||||
event library used for inspiration is the very small [Picoev][9] by
|
event library used for inspiration is the very small [Picoev][9] by
|
||||||
|
|||||||
Reference in new issue
Block a user