… | |
… | |
3374 | In addition to a working ISO-C implementation, libev relies on a few |
3374 | In addition to a working ISO-C implementation, libev relies on a few |
3375 | additional extensions: |
3375 | additional extensions: |
3376 | |
3376 | |
3377 | =over 4 |
3377 | =over 4 |
3378 | |
3378 | |
|
|
3379 | =item C<void (*)(ev_watcher_type *, int revents)> must have compatible |
|
|
3380 | calling conventions regardless of C<ev_watcher_type *>. |
|
|
3381 | |
|
|
3382 | Libev assumes not only that all watcher pointers have the same internal |
|
|
3383 | structure (guaranteed by POSIX but not by ISO C for example), but it also |
|
|
3384 | assumes that the same (machine) code can be used to call any watcher |
|
|
3385 | callback: The watcher callbacks have different type signatures, but libev |
|
|
3386 | calls them using an C<ev_watcher *> internally. |
|
|
3387 | |
3379 | =item C<sig_atomic_t volatile> must be thread-atomic as well |
3388 | =item C<sig_atomic_t volatile> must be thread-atomic as well |
3380 | |
3389 | |
3381 | The type C<sig_atomic_t volatile> (or whatever is defined as |
3390 | The type C<sig_atomic_t volatile> (or whatever is defined as |
3382 | C<EV_ATOMIC_T>) must be atomic w.r.t. accesses from different |
3391 | C<EV_ATOMIC_T>) must be atomic w.r.t. accesses from different |
3383 | threads. This is not part of the specification for C<sig_atomic_t>, but is |
3392 | threads. This is not part of the specification for C<sig_atomic_t>, but is |