aligned_t
qthread_incr(aligned_t *operand, int incr);
float
qthread_fincr(float *operand, float incr);
double
qthread_dincr(double *operand, double incr);
*operand += incr;
This function uses architecture-specific assembly to achieve this, but on unrecognized hardware will fall back to using qthread_lock() and qthread_unlock() to be thread-safe. Ordinarily, however, it does not use any of the available address locking mechanisms. There are exceptions. On 32-bit PowerPC, which has 64-bit doubles but does not have a 64-bit atomic load-and-reserve-word instruction. On this architecture we’re forced to use qthread_lock() and qthread_unlock().