summaryrefslogtreecommitdiff
path: root/lib/libevent
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2007-03-21 12:22:31 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2007-03-21 12:22:31 +0000
commitc0ead9feddf77d5dad992432507591a2ac5faff9 (patch)
tree932f47860c66a98839b7c2ffa571817e53bdfa5f /lib/libevent
parentcadcf6ece765dbbd4617ce6a3bcd5823ae8f563e (diff)
Document event_base_free(). OK jmc@
Diffstat (limited to 'lib/libevent')
-rw-r--r--lib/libevent/Makefile4
-rw-r--r--lib/libevent/event.311
2 files changed, 11 insertions, 4 deletions
diff --git a/lib/libevent/Makefile b/lib/libevent/Makefile
index 8c5702ff05a..7aa87a091b6 100644
--- a/lib/libevent/Makefile
+++ b/lib/libevent/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.23 2007/03/19 20:20:06 jmc Exp $
+# $OpenBSD: Makefile,v 1.24 2007/03/21 12:22:30 millert Exp $
LIB= event
WANTLINT=
@@ -8,7 +8,7 @@ HDRS= event.h evdns.h
MAN= evdns.3 event.3
MLINKS= event.3 event_init.3 event.3 event_dispatch.3 event.3 event_loop.3 \
event.3 event_loopexit.3 event.3 event_set.3 event.3 event_base_dispatch.3 \
- event.3 event_base_loop.3 event.3 event_base_loopexit.3 event.3 \
+ event.3 event_base_free.3 event.3 event_base_loop.3 event.3 event_base_loopexit.3 event.3 \
event_base_set.3 event.3 event_add.3 event.3 event_del.3 event.3 event_once.3 \
event.3 event_pending.3 event.3 event_initialized.3 event.3 \
event_priority_init.3 event.3 event_priority_set.3 event.3 evtimer_set.3 \
diff --git a/lib/libevent/event.3 b/lib/libevent/event.3
index 2213a0a0127..3eef024dd34 100644
--- a/lib/libevent/event.3
+++ b/lib/libevent/event.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: event.3,v 1.31 2007/03/19 20:32:41 jmc Exp $
+.\" $OpenBSD: event.3,v 1.32 2007/03/21 12:22:30 millert Exp $
.\"
.\" Copyright (c) 2000 Artur Grabowski <art@openbsd.org>
.\" All rights reserved.
@@ -36,6 +36,7 @@
.Nm event_base_loop ,
.Nm event_base_loopexit ,
.Nm event_base_set ,
+.Nm event_base_free ,
.Nm event_add ,
.Nm event_del ,
.Nm event_once ,
@@ -97,6 +98,8 @@
.Fn "event_base_loopexit" "struct event_base *base" "struct timeval *tv"
.Ft int
.Fn "event_base_set" "struct event_base *base" "struct event *"
+.Ft void
+.Fn "event_base_free" "struct event_base *base"
.Ft int
.Fn "event_add" "struct event *ev" "struct timeval *tv"
.Ft int
@@ -450,8 +453,9 @@ This event base can be used in conjunction with calls to
.Fn event_base_dispatch ,
.Fn event_base_loop ,
.Fn event_base_loopexit ,
+.Fn bufferevent_base_set
and
-.Fn bufferevent_base_set .
+.Fn event_base_free .
.Fn event_base_set
should be called after preparing an event with
.Fn event_set ,
@@ -461,6 +465,9 @@ assigns the provided event to the most recently created event base.
.Fn bufferevent_base_set
should be called after preparing a bufferevent with
.Fn bufferevent_new .
+.Fn event_base_free
+should be used to free memory associated with the event base
+when it is no longer needed.
.Sh BUFFERED EVENTS
.Nm libevent
provides an abstraction on top of the regular event callbacks.