On 01.06.2020 18:20, Kamil Rytarowski wrote: > On 01.06.2020 18:03, Joerg Sonnenberger wrote: >> On Tue, May 26, 2020 at 06:50:32AM +0200, Martin Husemann wrote: >>> On Tue, May 26, 2020 at 01:37:41AM +0200, Kamil Rytarowski wrote: >>>> I agree here with Joerg. >>>> >>>> At this point it's good to just add a wrapper as in the proposed patch. >>>> Once we will bump libc major, we can rename the syscall and remove >>>> pollts references. >>>> >>>> Weak alias would still be nicer, but it might be not worth the >>>> complexity of tweaking the syscall stab code generation. >>>> >>>> I think it's good to test t_pollts and t_ppoll as in theory they are >>>> different APIs. Long term t_pollts can be removed, after libc major bump. >>> >>> I don't think it is that complex, see the already existing >>> >>> /* >>> * WSYSCALL(weak,strong) is like RSYSCALL(weak), except that weak is >>> * a weak internal alias for the strong symbol. >>> */ >>> >>> (which is of course used for something totaly different right now, but >>> should work for this case too) and probably all it would take is a >>> special clause in lib/libc/sys/Makefile.inc. >>> >>> I would >>> >>> - rename the syscall >>> - either make an alias for the old name or use a wrapper as suggested (but >>> the other way around) >>> - check if there is a good place for a SYS_... define and add that as >>> an alias for syscall(2) >>> - rename the uses in the test case (just like the syscal has been renamed) >>> - add an entry in the libc TODO file for the mythical bump >> >> I'm quite against the useless churn of renaming the existing system >> call. It doesn't add any value. It might make sense if ppoll was a >> cancellation point, but it isn't and quite unlikely to become one. >> This literally should be a two line change and nothing more. >> >> Joerg >> > > While there. I have renamed universally all pollts occurrences to ppoll: > > http://netbsd.org/~kamil/patch-00263-pollts-rename-to-ppoll.2.txt > > IMHO keeping concurrently pollts + ppoll in kernel / rump / libc is > confusing, so I prefer to rename old and new pollts syscall occurrences. > > There are open questions whether to rename SYS___pollts50 to SYS_ppoll > and keep SYS_pollts for the legacy entry. Or rename two pollts syscalls, > but only redirect ppoll to SYS___ppoll50. > > Personally, I prefer to avoid WEAKASMPPOLL as a special case for > pollts/ppoll. It's cleaner to implement a thin C function that wraps it. > Regarding the cancellation point, pollts is used as one. I've added ppoll to libpthread too. Why would pollts be one and ppoll not?
Attachment:
signature.asc
Description: OpenPGP digital signature