cachepc-qemu

Fork of AMDESE/qemu with changes for cachepc side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-qemu
Log | Files | Refs | Submodules | LICENSE | sfeed.txt

check_time2.c (323B)


      1/* CB_SYS_time doesn't implement the Linux time syscall; the return
      2   value isn't written to the argument.  */
      3
      4#include <time.h>
      5#include <stdio.h>
      6#include <stdlib.h>
      7
      8int
      9main (void)
     10{
     11  time_t x = (time_t) -1;
     12  time_t t = time (&x);
     13
     14  if (t == (time_t) -1 || t != x)
     15    abort ();
     16  printf ("pass\n");
     17  exit (0);
     18}