• Jason A. Donenfeld's avatar
    selftests: vDSO: simplify getrandom thread local storage and structs · 01b52f01
    Jason A. Donenfeld authored
    Rather than using pthread_get/set_specific, just use gcc's __thread
    annotation, which is noticeably faster and makes the code more obvious.
    
    Also, just have one simplified struct called vgrnd, instead of trying to
    split things up semantically. Those divisions were useful when this code
    was split across several commit *messages*, but doesn't make as much
    sense within a single file. This should make the code more clear and
    provide a better example for implementers.
    Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
    01b52f01
vdso_test_getrandom.c 6.88 KB