On 09.08.2014 07:04, Zhuowei zhang (Redacted sender zhuoweizhang@xxxxxxxxx for DMARC) wrote:
During this port, I understood *how* the Solaris porters worked around a problem, but not *why* the workaround was needed in the first place. In the Solaris runtime, the pipe() system call is implemented in hand-written assembly, and passes the results in registers instead of storing them in a caller-provided array. I found that this handwritten function wasn't needed on 386, but is required on amd64, otherwise one gets an invalid value error from the kernel. I'm confused about why this is needed - what's the difference between writing to an array on 386 and on amd64?
None really. If you look at the kernel-side code [1], you'll see that the only parameter dependent error is B_BAD_ADDRESS (I assume you didn't mean B_BAD_VALUE). So I'd say you simply pass in an invalid pointer.
[...]
On a related note, during this port, I noticed that Haiku x86_64, unlike Solaris and possibly other 64-bit Unix-like OSes, has a 32-bit time_t i.e. the number of seconds in struct timespec is a 32-bit value. Does this mean that 64-bit Haiku is also subject to the Year 2038 problem?
Yes. It might not be trivial for us to switch time_t to 64 bit, but I guess we should do it earlier rather than later.
CU, Ingo[1] http://cgit.haiku-os.org/haiku/tree/src/system/kernel/fs/vfs.cpp?id=3aeed6607cd07762c0e709633c012b3a632dbad9#n9237