RfC: fueword(9) and casueword(9)
Konstantin Belousov
kostikbel at gmail.com
Sat Oct 25 20:31:10 UTC 2014
On Sat, Oct 25, 2014 at 09:43:44PM +0200, Jilles Tjoelker wrote:
> On Tue, Oct 21, 2014 at 07:23:06PM +0300, Konstantin Belousov wrote:
> > I prefer to not complicate the fetch(9) KPI due to the mistakes in the
> > umtx structures definitions. I think that it is bug to mark the lock
> > words with volatile. I want the fueword(9) interface to be as much
> > similar to fuword(9), in particular, volatile seems to be not needed.
>
> > Below is the updated patch, together with the bug fix noted by Eric.
>
> Hmm, consider returning an error number (that is, EFAULT) instead of -1
> on failure. This is somewhat like priv_check() which returns EPERM on
> failure, and probably reduces confusion if the return value is assigned
> to a variable named "error".
I did considered EFAULT. The KPI becomes too inconsistent if comparing
fueword with fuword or suword.
If you reference rv in kern_umtx.c, returning EFAULT for fueword or
casueword would not allow to use error directly. The reason is the
complicated logic of handling the suspend requests. Basically, non-errors
from userspace access must not obliterate the errors from previous
calls to check_suspend(). See r270345 for example of the bug from
earlier pass over userspace access in kern_umtx.c. There are still
more such bugs left in the patch, Peter and I chasing them.
>
> In share/man/man9/Makefile, MLINKS are still created for fuebyte.9 and
> fueword16.9.
Fixed, thank you.
>
> "successful" is consistently misspelled "successfull".
I corrected all occurences of successfull in the patch, but it is systematic
in the tree.
pooma% git grep -e successfull -- | grep -v successfully | wc -l
30
More information about the freebsd-arch
mailing list