Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Feb 2002 12:11:54 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Terry Lambert <tlambert2@mindspring.com>, Julian Elischer <julian@elischer.org>, Alfred Perlstein <bright@mu.org>, arch@FreeBSD.ORG, jhb@FreeBSD.ORG, peter@wemm.org, jake@locore.ca
Subject:   Re: gettimeofday() and crhold()/crfree() (was Re: gettimeofday()and copyout(). Is copyout() MPSAFE on non-i386 archs? ) 
Message-ID:  <200202172011.g1HKBsv88526@apollo.backplane.com>
References:   <5405.1013975811@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
:Peter and I actually had a sligthly different idea:
:
:Add a new syscall:
:
:	int getkernstuff(struct kernstuff *kp);
:
:	struct kernstuff {
:		u_int32_t	version;
:		pid_t		pid, ppid;
:		uid_t		uid, euid ...
:		gid_t		gid, guid ...
:		signal masks
:		...
:	}
:
:The idea here being that the userland process registers a single
:static structure with the kernel.  Inside libc, this structure
:can be used to speed up signal processing and much more.

    This would make time-of-day updates rather costly.  I would much
    prefer if the kernel was responsible for mapping the page(s) and for
    being told what the user process is actually wants to look at.
    That way the kernel has the maximum flexibility in regards to dealing
    with shareable information like the time of day, and unshareable
    information like the pid.

    Frankly, there isn't much point mapping the pid, uid, etc... those
    calls are not in the critical path.  The signal mask would be useful.
    But, again, I think it must be the kernel that does the mapping.  It
    is far too dangerous otherwise IMHO.

						-Matt


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202172011.g1HKBsv88526>