From owner-freebsd-current Thu Apr 3 01:28:10 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id BAA08982 for current-outgoing; Thu, 3 Apr 1997 01:28:10 -0800 (PST) Received: from hda.hda.com (hda-bicnet.bicnet.net [207.198.1.121]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id BAA08976 for ; Thu, 3 Apr 1997 01:28:06 -0800 (PST) Received: (from dufault@localhost) by hda.hda.com (8.8.5/8.8.5) id AAA03090; Thu, 3 Apr 1997 00:49:35 -0500 (EST) From: Peter Dufault Message-Id: <199704030549.AAA03090@hda.hda.com> Subject: Re: Internal clock In-Reply-To: <199704030423.AA299151399@fakir.india.hp.com> from A JOSEPH KOSHY at "Apr 3, 97 09:23:19 am" To: koshy@india.hp.com (A JOSEPH KOSHY) Date: Thu, 3 Apr 1997 00:49:34 -0500 (EST) Cc: current@freebsd.org X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > Shortly after the patches had been sent out I had folded them into the then > -current tree (Dec/Jan); the original patches were against 2.1.5 I think. > They were working fine under the limited testing I had done then. > > The Lite2 merge has touched many of the same files that the patches affected, > so I plan to redo this effort sometime in the (near?) future. I'm still > catching up with Lite2. Just a heads up that I'm working on this now. I'm not planning on committing until this sort of program works as expected and is reviewed. If I stop working on it I'll let the list know. #define _POSIX_SOURCE #define _POSIX_C_SOURCE 199309 #include #include #include #include #include int main(int ac, char *av[]) { int scheduler; #if _POSIX_VERSION < 199309 fprintf(stderr, "POSIX.4 is not supported\n"); exit(-1); #else #if !defined(_POSIX_PRIORITY_SCHEDULING) fprintf(stderr, "POSIX priority scheduling is not supported.\n"); exit(-1); #endif /* Is priority scheduling configured? */ errno = 0; if (sysconf(_SC_PRIORITY_SCHEDULING) == -1) { if (errno != 0) { /* This isn't valid - may be a standard violation */ perror("sysconf(_SC_PRIORITY_SCHEDULING)"); exit(errno); } else { fprintf(stderr, "Priority scheduling not supported.\n"); exit(-1); } } scheduler = sched_getscheduler(0); printf("sched_getscheduler says scheduler is %d.\n", scheduler); return 0; #endif /* _POSIX_VERSION < 199309 */ } -- Peter Dufault (dufault@hda.com) Realtime Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936