sync code with last improvements from OpenBSD
This commit is contained in:
parent
7116a5838e
commit
cb9f36df51
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: tar.c,v 1.71 2023/06/26 18:00:59 millert Exp $ */
|
/* $OpenBSD: tar.c,v 1.72 2023/08/19 04:21:05 guenther Exp $ */
|
||||||
/* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */
|
/* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -414,8 +414,7 @@ tar_rd(ARCHD *arcn, char *buf)
|
|||||||
arcn->sb.st_mtime = MAX_TIME_T;
|
arcn->sb.st_mtime = MAX_TIME_T;
|
||||||
else
|
else
|
||||||
arcn->sb.st_mtime = val;
|
arcn->sb.st_mtime = val;
|
||||||
arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime;
|
arcn->sb.st_ctim = arcn->sb.st_atim = arcn->sb.st_mtim;
|
||||||
arcn->sb.st_ctimensec = arcn->sb.st_atimensec = arcn->sb.st_mtimensec;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* have to look at the last character, it may be a '/' and that is used
|
* have to look at the last character, it may be a '/' and that is used
|
||||||
@ -793,12 +792,10 @@ reset:
|
|||||||
arcn->sb.st_mtime = val;
|
arcn->sb.st_mtime = val;
|
||||||
}
|
}
|
||||||
if (arcn->sb.st_ctime == 0) {
|
if (arcn->sb.st_ctime == 0) {
|
||||||
arcn->sb.st_ctime = arcn->sb.st_mtime;
|
arcn->sb.st_ctim = arcn->sb.st_mtim;
|
||||||
arcn->sb.st_ctimensec = arcn->sb.st_mtimensec;
|
|
||||||
}
|
}
|
||||||
if (arcn->sb.st_atime == 0) {
|
if (arcn->sb.st_atime == 0) {
|
||||||
arcn->sb.st_atime = arcn->sb.st_mtime;
|
arcn->sb.st_atim = arcn->sb.st_mtim;
|
||||||
arcn->sb.st_atimensec = arcn->sb.st_mtimensec;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: sched_bsd.c,v 1.82 2023/08/18 09:18:52 claudio Exp $ */
|
/* $OpenBSD: sched_bsd.c,v 1.83 2023/08/19 11:14:11 claudio Exp $ */
|
||||||
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
|
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
@ -442,26 +442,23 @@ mi_switch(void)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* We're running again; record our new start time. We might
|
* We're running again; record our new start time. We might
|
||||||
* be running on a new CPU now, so don't use the cache'd
|
* be running on a new CPU now, so refetch the schedstate_percpu
|
||||||
* schedstate_percpu pointer.
|
* pointer.
|
||||||
*/
|
*/
|
||||||
KASSERT(p->p_cpu == curcpu());
|
KASSERT(p->p_cpu == curcpu());
|
||||||
|
spc = &p->p_cpu->ci_schedstate;
|
||||||
|
|
||||||
/* Start any optional clock interrupts needed by the thread. */
|
/* Start any optional clock interrupts needed by the thread. */
|
||||||
if (ISSET(p->p_p->ps_flags, PS_ITIMER)) {
|
if (ISSET(p->p_p->ps_flags, PS_ITIMER)) {
|
||||||
atomic_setbits_int(&p->p_cpu->ci_schedstate.spc_schedflags,
|
atomic_setbits_int(&spc->spc_schedflags, SPCF_ITIMER);
|
||||||
SPCF_ITIMER);
|
clockintr_advance(spc->spc_itimer, hardclock_period);
|
||||||
clockintr_advance(p->p_cpu->ci_schedstate.spc_itimer,
|
|
||||||
hardclock_period);
|
|
||||||
}
|
}
|
||||||
if (ISSET(p->p_p->ps_flags, PS_PROFIL)) {
|
if (ISSET(p->p_p->ps_flags, PS_PROFIL)) {
|
||||||
atomic_setbits_int(&p->p_cpu->ci_schedstate.spc_schedflags,
|
atomic_setbits_int(&spc->spc_schedflags, SPCF_PROFCLOCK);
|
||||||
SPCF_PROFCLOCK);
|
clockintr_advance(spc->spc_profclock, profclock_period);
|
||||||
clockintr_advance(p->p_cpu->ci_schedstate.spc_profclock,
|
|
||||||
profclock_period);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nanouptime(&p->p_cpu->ci_schedstate.spc_runtime);
|
nanouptime(&spc->spc_runtime);
|
||||||
|
|
||||||
#ifdef MULTIPROCESSOR
|
#ifdef MULTIPROCESSOR
|
||||||
/*
|
/*
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef TIMESTAMP_H
|
#ifndef TIMESTAMP_H
|
||||||
#define TIMESTAMP_H
|
#define TIMESTAMP_H
|
||||||
|
|
||||||
/* $OpenBSD: timestamp.h,v 1.10 2013/05/22 12:14:08 espie Exp $ */
|
/* $OpenBSD: timestamp.h,v 1.11 2023/08/19 04:21:06 guenther Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Marc Espie.
|
* Copyright (c) 2001 Marc Espie.
|
||||||
@ -51,8 +51,7 @@
|
|||||||
|
|
||||||
#define ts_set_from_stat(s, t) \
|
#define ts_set_from_stat(s, t) \
|
||||||
do { \
|
do { \
|
||||||
(t).tv_sec = (s).st_mtime; \
|
(t) = (s).st_mtim; \
|
||||||
(t).tv_nsec = (s).st_mtimensec; \
|
|
||||||
if (is_out_of_date(t)) \
|
if (is_out_of_date(t)) \
|
||||||
(t).tv_nsec++; \
|
(t).tv_nsec++; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: walk.c,v 1.11 2022/01/11 05:34:32 jsg Exp $ */
|
/* $OpenBSD: walk.c,v 1.12 2023/08/19 04:21:06 guenther Exp $ */
|
||||||
/* $NetBSD: walk.c,v 1.29 2015/11/25 00:48:49 christos Exp $ */
|
/* $NetBSD: walk.c,v 1.29 2015/11/25 00:48:49 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -205,12 +205,10 @@ create_fsnode(const char *root, const char *path, const char *name,
|
|||||||
cur->inode->nlink = 1;
|
cur->inode->nlink = 1;
|
||||||
cur->inode->st = *stbuf;
|
cur->inode->st = *stbuf;
|
||||||
if (Tflag) {
|
if (Tflag) {
|
||||||
cur->inode->st.st_atime = stampts;
|
cur->inode->st.st_atim.tv_sec = stampts;
|
||||||
cur->inode->st.st_mtime = stampts;
|
cur->inode->st.st_atim.tv_nsec = 0;
|
||||||
cur->inode->st.st_ctime = stampts;
|
cur->inode->st.st_mtim = cur->inode->st.st_ctim =
|
||||||
cur->inode->st.st_atimensec = 0;
|
cur->inode->st.st_atim;
|
||||||
cur->inode->st.st_mtimensec = 0;
|
|
||||||
cur->inode->st.st_ctimensec = 0;
|
|
||||||
}
|
}
|
||||||
return (cur);
|
return (cur);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user