From robert@sleipnir.watson.org  Mon Oct 19 14:48:22 1998
Received: from sleipnir.watson.org (SLEIPNIR.RES.CMU.EDU [128.2.91.229])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA23447
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 Oct 1998 14:48:20 -0700 (PDT)
          (envelope-from robert@sleipnir.watson.org)
Received: (from robert@localhost)
	by sleipnir.watson.org (8.9.1/8.8.8) id OAA20173;
	Mon, 19 Oct 1998 14:29:52 -0400 (EDT)
	(envelope-from robert)
Message-Id: <199810191829.OAA20173@sleipnir.watson.org>
Date: Mon, 19 Oct 1998 14:29:52 -0400 (EDT)
From: robert@fledge.watson.org
Reply-To: robert+freebsd@cyrus.watson.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: clock_gettime and CLOCK_VIRTUAL -- not implemented
X-Send-Pr-Version: 3.2

>Number:         8376
>Category:       kern
>Synopsis:       CLOCK_VIRTUAL not implemented
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    tjr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 19 14:50:00 PDT 1998
>Closed-Date:    Sun Dec 19 04:23:26 GMT 2004
>Last-Modified:  Sun Dec 19 04:23:26 GMT 2004
>Originator:     Robert Watson
>Release:        FreeBSD 3.0-BETA i386
>Organization:
>Environment:

3.0-BETA

>Description:

This is either a documentation bug or a software bug.  Currently, clock_gettime
syscall does not implement CLOCK_VIRTUAL as described in clock_gettime(2).
EINVAL is returned.  Either a BUGS section should be added to clock_gettime(2)
to indicate that a described feature is not present, or the implementation
should be fixed.

>How-To-Repeat:
	struct timespec ts;
	if (clock_gettime(CLOCK_VIRTUAL, &ts) != 0) {
		perror("clock_gettime");
		exit(-1);
	}
>Fix:
	
Described in description.  I have not written up patches.  Presumably a fix
would require maintaining state in the proc structure -- this would be
inefficient in many ways as most processes don't use realtime clock data
about themselves.  Maintaining the accuracy of a lot of clocks is presumably
far less easy than maintaining it for a few.

>Release-Note:
>Audit-Trail:

From: Robert Watson <robert@cyrus.watson.org>
To: FreeBSD-gnats-submit@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG
Cc:  Subject: Re: kern/8376: clock_gettime and CLOCK_VIRTUAL -- not implemented
Date: Mon, 19 Oct 1998 21:26:13 -0400 (EDT)

 Additionally, POSIX.1b-1993 indicates that the clock_* functions and
 CLOCK_* constants should be defined in time.h, not in sys/time.h. 
 
 (Bad luck for non-POSIX today, I have a copy of the spec in front of me
 for a change -- that and I am trying to write portable code that uses
 accurate timing on multiple platforms :).
 
 On Mon, 19 Oct 1998 FreeBSD-gnats-submit@FreeBSD.ORG wrote:
 
 > Thank you very much for your problem report.
 > It has the internal identification `kern/8376'.
 > The individual assigned to look at your
 > report is: freebsd-bugs. 
 > 
 > >Category:       kern
 > >Responsible:    freebsd-bugs
 > >Synopsis:       CLOCK_VIRTUAL not implemented
 > >Arrival-Date:   Mon Oct 19 14:50:00 PDT 1998
 > 
 
 
   Robert N Watson 
 
 Carnegie Mellon University            http://www.cmu.edu/
 TIS Labs at Network Associates, Inc.  http://www.tis.com/
 SafePort Network Services             http://www.safeport.com/
 robert@fledge.watson.org              http://www.watson.org/~robert/
 

From: Bruce Evans <bde@zeta.org.au>
To: freebsd-bugs@FreeBSD.ORG, FreeBSD-gnats-submit@FreeBSD.ORG,
        robert+freebsd@cyrus.watson.org
Cc:  Subject: Re: kern/8376: clock_gettime and CLOCK_VIRTUAL -- not implemented
Date: Tue, 20 Oct 1998 15:38:12 +1000

 >Additionally, POSIX.1b-1993 indicates that the clock_* functions and
 >CLOCK_* constants should be defined in time.h, not in sys/time.h. 
 
 So does <sys/time.h> :-].  POSIX.1b is mostly not implemented.
 
 Bruce
Responsible-Changed-From-To: freebsd-bugs->tjr 
Responsible-Changed-By: johan 
Responsible-Changed-When: Sun Feb 23 03:57:29 PST 2003 
Responsible-Changed-Why:  
Tim said he will add CLOCK_VIRTUAL. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=8376 
State-Changed-From-To: open->closed 
State-Changed-By: tjr 
State-Changed-When: Sun Dec 19 04:22:40 GMT 2004 
State-Changed-Why:  
Supported in 5-STABLE and 6-CURRENT. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=8376 
>Unformatted:
