tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: fetch32/store32 et al
In article <20091024203507.03CD563B151%mail.netbsd.org@localhost>,
Mindaugas Rasiukevicius <rmind%netbsd.org@localhost> wrote:
>Hello,
>
>Unless anyone objects, I would like to replace current fuword(), suword()
>and friends with a little bit better API:
>
> int fetch32(void *addr, uint32_t *c);
> int store32(void *addr, uint32_t c);
>
>And equivalent routines to fetch/store 8, 16 and 64 (if needed) bit values.
>Routines would return 0 on success and EFAULT on failure.
>
>Rationale: 1) there are already bugs in the tree where incorrect sizes of
>"word" are assumed (e.g. see amd64 fuword) 2) currently, fuword() et al
>cannot return -1 as a value.
>
>Also, this would be consistent with atomic_ops(3) and would close PR/2512.
Sounds good to me...
christos
Home |
Main Index |
Thread Index |
Old Index