diff options
author | root <root@ka-ata-killa.ourano.james.local> | 2021-03-03 10:35:16 +0000 |
---|---|---|
committer | root <root@ka-ata-killa.ourano.james.local> | 2021-03-03 10:35:16 +0000 |
commit | f10c1497babaf3010def44a999092a4b55e84460 (patch) | |
tree | e64c6c52779ffbda10f0b1d59c6223b646dc6c16 /app/ptp.c | |
parent | b4bfacd4c294966fa09f296aecf6513f9d30c4ed (diff) | |
download | clock-f10c1497babaf3010def44a999092a4b55e84460.tar.gz clock-f10c1497babaf3010def44a999092a4b55e84460.tar.bz2 clock-f10c1497babaf3010def44a999092a4b55e84460.zip |
fix hang when ptp clock rolls over during fetch
Diffstat (limited to 'app/ptp.c')
-rw-r--r-- | app/ptp.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -80,11 +80,12 @@ uint64_t ptp_get (void) { uint32_t pl, ph; - ph = ETH_PTPTSHR; do { + ph = ETH_PTPTSHR; compiler_mb(); pl = ETH_PTPTSLR; + compiler_mb(); } while (ph != ETH_PTPTSHR); return ptp_to_u64 (pl, ph); |