~ubuntu-branches/ubuntu/trusty/syslog-ng/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/ivykis/modules/man3/iv_event.3

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS), Gergely Nagy
  • Date: 2011-10-11 14:30:48 UTC
  • mfrom: (1.3.7)
  • Revision ID: package-import@ubuntu.com-20111011143048-r1iljux9xbvj3lwh
Tags: 3.3.1.dfsg-1
* New upstream release with important fixes from upstream git tree with
  non-free manpages removed.
* Drop syslog-ng.conf(5) (closes: #496521).
* syslog-ng(8) is generated, and does not mention -Q anymore
  (closes: #616069).
* Supports CAP_SYSLOG on recent kernels (closes: #630172).
* Does not use g_timeout_add_seconds anymore (closes: #609154).

[ Gergely Nagy <algernon@madhouse-project.org> ]
* Update debian/copyright to DEP-5 format.
* Simplified the logrotate file by merging identical entries.
* Include local configuration files from /etc/syslog-ng/conf.d/ (Closes:
  #609050).
* Update syslog-ng.conf to be fully 3.3 compliant.
* Compress both source and binaries (except the syslog-ng meta
  package) with xz, instead of gzip.
* Use dpkg triggers to restart syslog-ng when appropriate.
* Include DFSG-free manual pages for all binaries.
* Build with Hardening enabled.
* Mention syslog(3) in /etc/default/syslog-ng, instead of
  <linux/kernel.h> (Closes: #608605)
* Support 'status' in the init script.
  Patch from Peter Eisentraut <petere@debian.org> (Closes: #644458)
* Build-Depend on libevtlog-dev (>= 0.2.12-5~) for correct shlibs.
* Use [linux-any] in Build-Depends instead of hardcoded links.
  (Closes: #634715)
* Use $SYSLOGNG_OPTS in the init script when reloading syslog-ng.
  (Closes: #589081)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\" This man page is Copyright (C) 2010 Lennert Buytenhek.
 
2
.\" Permission is granted to distribute possibly modified copies
 
3
.\" of this page provided the header is included verbatim,
 
4
.\" and in case of nontrivial modification author and date
 
5
.\" of the modification is added to the header.
 
6
.TH iv_event 3 2010-09-03 "ivykis" "ivykis programmer's manual"
 
7
.SH NAME
 
8
IV_EVENT_INIT, iv_event_register, iv_event_unregister, iv_event_post \- manage ivykis objects for event notification
 
9
.SH SYNOPSIS
 
10
.B #include <iv_event.h>
 
11
.sp
 
12
.nf
 
13
struct iv_event {
 
14
        void            *cookie;
 
15
        void            (*handler)(void *);
 
16
};
 
17
.fi
 
18
.sp
 
19
.BI "int IV_EVENT_INIT(struct iv_event *" this ");"
 
20
.br
 
21
.BI "int iv_event_register(struct iv_event *" this ");"
 
22
.br
 
23
.BI "void iv_event_unregister(struct iv_event *" this ");"
 
24
.br
 
25
.BI "void iv_event_post(struct iv_event *" this ");"
 
26
.br
 
27
.SH DESCRIPTION
 
28
.B iv_event
 
29
provides a way for delivering events to
 
30
.BR ivykis (3)
 
31
recipients across thread boundaries.
 
32
.PP
 
33
The intended event recipient calls
 
34
.B IV_EVENT_INIT
 
35
on a
 
36
.B struct iv_event
 
37
object, fills in
 
38
.B ->cookie
 
39
and
 
40
.B ->handler,
 
41
and then calls
 
42
.B iv_event_register
 
43
on the object.
 
44
.PP
 
45
To generate an event, call
 
46
.B iv_event_post
 
47
on the previously initialized
 
48
.B struct iv_event
 
49
object.  This will cause the callback specified by
 
50
.B ->handler
 
51
to be called in the thread that the
 
52
.B struct iv_event
 
53
object was registered in, with
 
54
.B ->cookie
 
55
as its sole argument.
 
56
.PP
 
57
To deinitialize a
 
58
.B struct iv_event
 
59
object, call
 
60
.B iv_event_unregister
 
61
from the same thread that
 
62
.B iv_event_register
 
63
was called from on that object.
 
64
.PP
 
65
It is permitted to unregister a
 
66
.B struct iv_event
 
67
object from any ivykis callback function in the thread it was
 
68
registered in, including from a callback function triggered by this
 
69
object, and it is permitted to free the memory corresponding to an
 
70
unregistered object from its own callback function.
 
71
.PP
 
72
.B iv_event_post
 
73
can be called from the same thread that
 
74
.B iv_event_register
 
75
was called from, or from a different thread within the same process,
 
76
but can not be called from a different process, and can not be called
 
77
from signal handlers.  If you need this functionality, look at
 
78
.BR iv_event_raw (3).
 
79
.PP
 
80
Internally,
 
81
.B iv_event
 
82
is implemented as a wrapper around
 
83
.BR iv_event_raw (3),
 
84
and multiplexes multiple
 
85
.B struct iv_event
 
86
objects over per-thread
 
87
.B struct iv_event_raw
 
88
objects, to save file descriptors and kernel resources.
 
89
.PP
 
90
.SH "SEE ALSO"
 
91
.BR ivykis (3),
 
92
.BR iv_event_raw (3)