3 ms·
Even on x86, you could have a pthread_mutex protecting a struct with two integers that need to be updated "atomically", and have a signal delivered in the middl
by 0x0 10y ago
Even on x86, you could have a pthread_mutex protecting a struct with two integers that need to be updated "atomically", and have a signal delivered in the middle?
- jasonzemos 10y agoSure, and then the handler only sees one integer as updated and the other integer will be updated after the handler. The lock gets silently broken unfortunately, but there's probably a useful reason for why this is. It could just deadlock instead.