Some functions are missing handshake_thread prefix
This handshake_thread naming convention is intended to mitigate the danger of forgetting which thread a function is designed to be called from. It only works if all functions called on the handshake thread are annotated appropriately.
The FIXME in the buffer_application_data() function perfectly illustrates why this is required: it's too easy to miss spots that require mutexes without it. Although, it's also hard to reason about when mutexes are required, and in this case I believe I was wrong. After app_data_buf is written here on the handshake thread, the op_mutex will be unlocked before it's read from. Fragile, yes, but I have some plans to improve this in the futrue.