diff options
author | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2024-01-24 19:23:40 +0000 |
---|---|---|
committer | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2024-01-24 19:23:40 +0000 |
commit | 8cb898c555527cf989801c7e83938ec6f7e32288 (patch) | |
tree | 32acb5bd373d406406213baca20ec260702dce12 /games/factor | |
parent | 3dee2e31d0d48fb3d7aab4917b155daa51330768 (diff) |
clockintr: switch from callee- to caller-allocated clockintr structs
Currently, clockintr_establish() calls malloc(9) to allocate a
clockintr struct on behalf of the caller. mpi@ says this behavior is
incompatible with dt(4). In particular, calling malloc(9) during the
initialization of a PCB outside of dt_pcb_alloc() is (a) awkward and
(b) may conflict with future changes/optimizations to PCB allocation.
To side-step the problem, this patch changes the clockintr subsystem
to use caller-allocated clockintr structs instead of callee-allocated
structs.
clockintr_establish() is named after softintr_establish(), which uses
malloc(9) internally to create softintr objects. The clockintr subsystem
is no longer using malloc(9), so the "establish" naming is no longer apt.
To avoid confusion, this patch also renames "clockintr_establish" to
"clockintr_bind".
Requested by mpi@. Tweaked by mpi@.
Thread: https://marc.info/?l=openbsd-tech&m=170597126103504&w=2
ok claudio@ mlarkin@ mpi@
Diffstat (limited to 'games/factor')
0 files changed, 0 insertions, 0 deletions