Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to properly wait for transaction completion?



Oh, and it has cv_timedwait(), it's even better!
Thanks a lot!

On 28/09/2022 22:29, Mouse wrote:
Ideally, once the transaction is started, I'd like to wait in my
exec() function for a "signal" raised by the interrupt handler, so as
to avoid a busy wait.
This sounds to me like a use case for condition variables.  Look up
cv_init, cv_destroy, cv_wait (and its variants, eg, cv_timedwait_sig),
cv_signal, cv_broadcast....  But there probably are plenty of other
things you could use and I likely don't know all of them.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
  X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B



Home | Main Index | Thread Index | Old Index