Annotation of XNU/osfmk/sys/time.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * The contents of this file constitute Original Code as defined in and
                      7:  * are subject to the Apple Public Source License Version 1.1 (the
                      8:  * "License").  You may not use this file except in compliance with the
                      9:  * License.  Please obtain a copy of the License at
                     10:  * http://www.apple.com/publicsource and read it before using this file.
                     11:  * 
                     12:  * This Original Code and all software distributed under the License are
                     13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     17:  * License for the specific language governing rights and limitations
                     18:  * under the License.
                     19:  * 
                     20:  * @APPLE_LICENSE_HEADER_END@
                     21:  */
                     22: /*
                     23:  * @OSF_COPYRIGHT@
                     24:  */
                     25: /*
                     26:  * HISTORY
                     27:  * 
                     28:  * Revision 1.1.1.1  1998/09/22 21:05:48  wsanchez
                     29:  * Import of Mac OS X kernel (~semeria)
                     30:  *
                     31:  * Revision 1.1.1.1  1998/03/07 02:25:59  wsanchez
                     32:  * Import of OSF Mach kernel (~mburg)
                     33:  *
                     34:  * Revision 1.2.6.1  1994/09/23  03:13:17  ezf
                     35:  *     change marker to not FREE
                     36:  *     [1994/09/22  21:58:56  ezf]
                     37:  *
                     38:  * Revision 1.2.2.2  1993/06/09  02:55:33  gm
                     39:  *     Added to OSF/1 R1.3 from NMK15.0.
                     40:  *     [1993/06/02  21:31:02  jeffc]
                     41:  * 
                     42:  * Revision 1.2  1993/04/19  17:17:07  devrcs
                     43:  *     Fixes for ANSI C
                     44:  *     [1993/02/26  14:02:46  sp]
                     45:  * 
                     46:  * Revision 1.1  1992/09/30  02:36:58  robert
                     47:  *     Initial revision
                     48:  * 
                     49:  * $EndLog$
                     50:  */
                     51: /* CMU_HIST */
                     52: /*
                     53:  * Revision 2.3  91/05/14  17:40:25  mrt
                     54:  *     Correcting copyright
                     55:  * 
                     56:  * Revision 2.2  91/02/05  17:56:58  mrt
                     57:  *     Changed to new Mach copyright
                     58:  *     [91/02/01  17:49:29  mrt]
                     59:  * 
                     60:  */
                     61: /* CMU_ENDHIST */
                     62: /*
                     63:  * Mach Operating System
                     64:  * Copyright (c) 1991 Carnegie Mellon University
                     65:  * All Rights Reserved.
                     66:  * 
                     67:  * Permission to use, copy, modify and distribute this software and its
                     68:  * documentation is hereby granted, provided that both the copyright
                     69:  * notice and this permission notice appear in all copies of the
                     70:  * software, derivative works or modified versions, and any portions
                     71:  * thereof, and that both notices appear in supporting documentation.
                     72:  *
                     73:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     74:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
                     75:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
                     76:  *
                     77:  * Carnegie Mellon requests users of this software to return to
                     78:  *
                     79:  *  Software Distribution Coordinator  or  [email protected]
                     80:  *  School of Computer Science
                     81:  *  Carnegie Mellon University
                     82:  *  Pittsburgh PA 15213-3890
                     83:  *
                     84:  * any improvements or extensions that they make and grant Carnegie Mellon rights
                     85:  * to redistribute these changes.
                     86:  */
                     87: /*
                     88:  */
                     89: /*
                     90:  *     Time-keeper for kernel IO devices.
                     91:  *
                     92:  *     May or may not have any relation to wall-clock time.
                     93:  */
                     94: 
                     95: #ifndef _SYS_TIME_H_
                     96: #define _SYS_TIME_H_
                     97: #include <mach/time_value.h>
                     98: 
                     99: extern time_value_t    time;
                    100: 
                    101: /*
                    102:  * Definitions to keep old code happy.
                    103:  */
                    104: #define timeval_t time_value_t
                    105: #define timeval time_value
                    106: #define        tv_sec  seconds
                    107: #define        tv_usec microseconds
                    108: 
                    109: #define timerisset(tvp)                ((tvp)->tv_sec || (tvp)->tv_usec)
                    110: #define timercmp(tvp, uvp, cmp)        \
                    111:        ((tvp)->tv_sec cmp (uvp)->tv_sec || \
                    112:         (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
                    113: #define timerclear(tvp)                (tvp)->tv_sec = (tvp)->tv_usec = 0
                    114: #endif /* _SYS_TIME_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.