File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,28 @@ do { \
314314})
315315#endif
316316
317+ /**
318+ * smp_cond_load_acquire_timeout() - (Spin) wait for cond with ACQUIRE ordering
319+ * until a timeout expires.
320+ *
321+ * Arguments: same as smp_cond_load_relaxed_timeout().
322+ *
323+ * Equivalent to using smp_cond_load_acquire() on the condition variable with
324+ * a timeout.
325+ */
326+ #ifndef smp_cond_load_acquire_timeout
327+ #define smp_cond_load_acquire_timeout (ptr , cond_expr , time_check_expr ) \
328+ ({ \
329+ __unqual_scalar_typeof(*ptr) _val; \
330+ _val = smp_cond_load_relaxed_timeout(ptr, cond_expr, \
331+ time_check_expr); \
332+ \
333+ /* Depends on the control dependency of the wait above. */ \
334+ smp_acquire__after_ctrl_dep (); \
335+ (typeof (* ptr ))_val ; \
336+ })
337+ #endif
338+
317339/*
318340 * pmem_wmb() ensures that all stores for which the modification
319341 * are written to persistent storage by preceding instructions have
You can’t perform that action at this time.
0 commit comments