tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: EV_SET() better C++ compat with alternative implementations
I think the rationale was to make it possible to use for integer values and operations without cast. And make it clear it can hold arbitrary value, not necessarily pointer. Unfortunately intptr_t has different size in 32 vs 64 bit same as void *, which I didnt consider.
Using (void *) would be bad IMO. If we want to change this, please follow the mac OS and use explicit integer 64bit types instead. This would of course change ABI so needs versioning.
Jaromir
> Le 12 août 2019 à 14:51, Valery Ushakov <uwe%stderr.spb.ru@localhost> a écrit :
>
>> On Mon, Aug 12, 2019 at 03:43:56 +0000, maya%NetBSD.org@localhost wrote:
>>
>> So, this is when we changed to intptr_t. We also went through a
>> "int64_t udata" revision at some point, later.
>>
>> Module Name: syssrc
>> Committed By: jdolecek
>> Date: Wed Oct 2 19:09:37 UTC 2002
>>
>> Modified Files:
>> syssrc/sys/sys [kqueue]: event.h
>>
>> Log Message:
>> make 'udata' field of struct kevent intptr_t (was 'void *')
> [...]
>> jdolecek, do you remember why you wanted to switch?
>
> Could it be related to 64-bit kernel vs. 32-bit userland (one of the
> mips ABIs?)
>
> -uwe
Home |
Main Index |
Thread Index |
Old Index