Re: return values - 32, 64, 128 bits, type defs...etc/platform size

From: Linda Walsh (law@sgi.com)
Date: Fri Apr 21 2000 - 17:29:12 EST


Peter Rival wrote:
> Nope. And a classic mistake of 32bit programmers at that. ;) On Alpha (dunno about SPARC) long long ==
> long == 64 bits, int == 32 bits.

---

Hmmm....so some of the syscalls treat return value as an 'int' (stime). I take it that 64 bit kernels always return a 64 bit value and in 'int' cases, it is just truncated (?).

Hmmm....this would be a radical step -- something for a .odd kernel, but maybe the 32-bit arch's should also return 64 bits (ia - edx,eax)? I don't see 64 bit PC's as being commonplace in the near future and I'm sure we'll still want linux to run on a 32-bit machine for sometime to come. But it seems "logical" that we might want to start moving some values to 64 bit even on the 32-bit archs -- specifically enabling system calls to return 64 bits. This would keep the code more maintainable -- no system call special kludges like "default handlers" for lseek -- and no worries about overflowing long running counters.

Is this feasible on the i386 base? Desirable? Undesirable?

-l

-- Linda A Walsh | Trust Technology, Core Linux, SGI law@sgi.com | Voice: (650) 933-5338

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:19 EST