> What prevents one thread from calling mlx5_spin_unlock(), and then > having a second thread call mlx5_spin_lock() and observe in_use == 1 > before the first thread gets to set in_use = 0? Never mind, I think this is a bogus argument - if we are using in_use then the contract of the single-threaded user of the library is that it can't acquire the lock until the unlock function returns. - R. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html