From 889eb76731ccf087917f3f520aef8471568f9bfa Mon Sep 17 00:00:00 2001 From: Gedare Bloom Date: Wed, 15 Mar 2017 14:29:19 -0400 Subject: posix/mman: update atime on shared memory read call Update #2859. --- cpukit/posix/include/rtems/posix/shmimpl.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cpukit/posix/include') diff --git a/cpukit/posix/include/rtems/posix/shmimpl.h b/cpukit/posix/include/rtems/posix/shmimpl.h index 207f50fc95..ff3299ebe0 100644 --- a/cpukit/posix/include/rtems/posix/shmimpl.h +++ b/cpukit/posix/include/rtems/posix/shmimpl.h @@ -84,6 +84,15 @@ RTEMS_INLINE_ROUTINE POSIX_Shm_Control *_POSIX_Shm_Get_by_name( ); } +RTEMS_INLINE_ROUTINE void _POSIX_Shm_Update_atime( + POSIX_Shm_Control *shm +) +{ + struct timeval now; + gettimeofday( &now, 0 ); + shm->atime = now.tv_sec; +} + RTEMS_INLINE_ROUTINE void _POSIX_Shm_Update_mtime_ctime( POSIX_Shm_Control *shm ) -- cgit v1.2.3