summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1998-03-26 20:54:05 +0000
committerphk <phk@FreeBSD.org>1998-03-26 20:54:05 +0000
commit00475b662ad28e7f09931eb67a642ba1ee36db99 (patch)
tree12dd2aed1e3b8ecf5eb4152bf06ffa8c3ede0d7e /sys/gnu
parentff4953fbcc9f747429234d5971a802bb653e451a (diff)
downloadFreeBSD-src-00475b662ad28e7f09931eb67a642ba1ee36db99.zip
FreeBSD-src-00475b662ad28e7f09931eb67a642ba1ee36db99.tar.gz
Add two new functions, get{micro|nano}time.
They are atomic, but return in essence what is in the "time" variable. gettime() is now a macro front for getmicrotime(). Various patches to use the two new functions instead of the various hacks used in their absence. Some puntuation and grammer patches from Bruce. A couple of XXX comments.
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/ext2fs/inode.h25
-rw-r--r--sys/gnu/fs/ext2fs/inode.h25
2 files changed, 2 insertions, 48 deletions
diff --git a/sys/gnu/ext2fs/inode.h b/sys/gnu/ext2fs/inode.h
index 4bd1cf5..c787e1e 100644
--- a/sys/gnu/ext2fs/inode.h
+++ b/sys/gnu/ext2fs/inode.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)inode.h 8.9 (Berkeley) 5/14/95
- * $Id: inode.h,v 1.20 1998/01/30 11:34:02 phk Exp $
+ * $Id: inode.h,v 1.21 1998/03/08 09:59:21 julian Exp $
*/
#ifndef _UFS_UFS_INODE_H_
@@ -143,29 +143,6 @@ struct indir {
#define VTOI(vp) ((struct inode *)(vp)->v_data)
#define ITOV(ip) ((ip)->i_vnode)
-/*
- * XXX this is too long to be a macro, and isn't used in any time-critical
- * place; in fact it is only used in ufs_vnops.c so it shouldn't be in a
- * header file.
- */
-#define ITIMES(ip, t1, t2) { \
- long tv_sec = time.tv_sec; \
- if ((ip)->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE)) { \
- (ip)->i_flag |= IN_MODIFIED; \
- if ((ip)->i_flag & IN_ACCESS) \
- (ip)->i_atime \
- = ((t1) == &time ? tv_sec : (t1)->tv_sec); \
- if ((ip)->i_flag & IN_UPDATE) { \
- (ip)->i_mtime \
- = ((t2) == &time ? tv_sec : (t2)->tv_sec); \
- (ip)->i_modrev++; \
- } \
- if ((ip)->i_flag & IN_CHANGE) \
- (ip)->i_ctime = tv_sec; \
- (ip)->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_UPDATE); \
- } \
-}
-
/* Determine if soft dependencies are being done */
#define DOINGSOFTDEP(vp) ((vp)->v_mount->mnt_flag & MNT_SOFTDEP)
diff --git a/sys/gnu/fs/ext2fs/inode.h b/sys/gnu/fs/ext2fs/inode.h
index 4bd1cf5..c787e1e 100644
--- a/sys/gnu/fs/ext2fs/inode.h
+++ b/sys/gnu/fs/ext2fs/inode.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)inode.h 8.9 (Berkeley) 5/14/95
- * $Id: inode.h,v 1.20 1998/01/30 11:34:02 phk Exp $
+ * $Id: inode.h,v 1.21 1998/03/08 09:59:21 julian Exp $
*/
#ifndef _UFS_UFS_INODE_H_
@@ -143,29 +143,6 @@ struct indir {
#define VTOI(vp) ((struct inode *)(vp)->v_data)
#define ITOV(ip) ((ip)->i_vnode)
-/*
- * XXX this is too long to be a macro, and isn't used in any time-critical
- * place; in fact it is only used in ufs_vnops.c so it shouldn't be in a
- * header file.
- */
-#define ITIMES(ip, t1, t2) { \
- long tv_sec = time.tv_sec; \
- if ((ip)->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE)) { \
- (ip)->i_flag |= IN_MODIFIED; \
- if ((ip)->i_flag & IN_ACCESS) \
- (ip)->i_atime \
- = ((t1) == &time ? tv_sec : (t1)->tv_sec); \
- if ((ip)->i_flag & IN_UPDATE) { \
- (ip)->i_mtime \
- = ((t2) == &time ? tv_sec : (t2)->tv_sec); \
- (ip)->i_modrev++; \
- } \
- if ((ip)->i_flag & IN_CHANGE) \
- (ip)->i_ctime = tv_sec; \
- (ip)->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_UPDATE); \
- } \
-}
-
/* Determine if soft dependencies are being done */
#define DOINGSOFTDEP(vp) ((vp)->v_mount->mnt_flag & MNT_SOFTDEP)
OpenPOWER on IntegriCloud