I just saw with truss the following: fstat64(5, 0x08062448) = 0 fcntl(5, F_SETFD, 0x00000001) = 0 llseek(5, 1068220, SEEK_SET) = 1068220 fstat64(5, 0x080452C0) = 0 fstat64(5, 0x080451D0) = 0 ioctl(5, TCGETA, 0x08045270) Err#25 ENOTTY read(5, " F r o m k d e - b u g".., 131072) = 131072 llseek(5, 0xFFFFFFFFFFFE0831, SEEK_CUR) = 1070317 close(5) = 0 time() = 1281441644 time() = 1281441644 time() = 1281441644 time() = 1281441644 time() = 1281441644 time() = 1281441644 time() = 1281441644 time() = 1281441644 time() = 1281441644
If I understand it correctly the call of time() is a system call and requires each time context switching etc... Would it be not faster (for the performance) that every libc linked program opens only once at startup a device like /dev/time (which does not exists on opensolaris) and uses mmap on it? Would this not be faster than executing each time a system call? I mean the libc could then read the time directly from memory instead of doing a system call each time. The libc call time() would still return the current time. It would be transparent for normal userspace programs. What do you think? -- This message posted from opensolaris.org _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code