epoch.9 (fa9896e082a1046ff4fbc75fcba4d18d1f2efc19) epoch.9 (04b90ac0f9e883a485bad4b0edf516395596d17f)
1.\"
2.\" Copyright (C) 2018 Matthew Macy <mmacy@FreeBSD.org>.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice(s), this list of conditions and the following disclaimer as

--- 10 unchanged lines hidden (view full) ---

19.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
25.\" DAMAGE.
26.\"
1.\"
2.\" Copyright (C) 2018 Matthew Macy <mmacy@FreeBSD.org>.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice(s), this list of conditions and the following disclaimer as

--- 10 unchanged lines hidden (view full) ---

19.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
25.\" DAMAGE.
26.\"
27.Dd April 30, 2020
27.Dd March 25, 2024
28.Dt EPOCH 9
29.Os
30.Sh NAME
31.Nm epoch ,
32.Nm epoch_context ,
33.Nm epoch_alloc ,
34.Nm epoch_free ,
35.Nm epoch_enter ,

--- 219 unchanged lines hidden (view full) ---

255.Ed
256.Pp
257Thread 1 traverses the ifaddr list in an epoch.
258Thread 2 unlinks with the corresponding epoch safe macro, marks as logically free,
259and then defers deletion.
260More general mutation or a synchronous
261free would have to follow a call to
262.Fn epoch_wait .
28.Dt EPOCH 9
29.Os
30.Sh NAME
31.Nm epoch ,
32.Nm epoch_context ,
33.Nm epoch_alloc ,
34.Nm epoch_free ,
35.Nm epoch_enter ,

--- 219 unchanged lines hidden (view full) ---

255.Ed
256.Pp
257Thread 1 traverses the ifaddr list in an epoch.
258Thread 2 unlinks with the corresponding epoch safe macro, marks as logically free,
259and then defers deletion.
260More general mutation or a synchronous
261free would have to follow a call to
262.Fn epoch_wait .
263.Sh NOTES
264The
265.Nm
266kernel programming interface is under development and is subject to change.
267.Sh SEE ALSO
268.Xr callout 9 ,
269.Xr locking 9 ,
270.Xr mtx_pool 9 ,
271.Xr mutex 9 ,
272.Xr rwlock 9 ,
273.Xr sema 9 ,
274.Xr sleep 9 ,

--- 20 unchanged lines hidden ---
263.Sh SEE ALSO
264.Xr callout 9 ,
265.Xr locking 9 ,
266.Xr mtx_pool 9 ,
267.Xr mutex 9 ,
268.Xr rwlock 9 ,
269.Xr sema 9 ,
270.Xr sleep 9 ,

--- 20 unchanged lines hidden ---