|
@@ -60,8 +60,8 @@ static inline void _starpu_sync_data_with_mem_continuation(void *arg)
|
|
|
|
|
|
STARPU_ASSERT(handle);
|
|
|
|
|
|
- unsigned r = (statenode->mode != STARPU_W);
|
|
|
- unsigned w = (statenode->mode != STARPU_R);
|
|
|
+ unsigned r = (statenode->mode & STARPU_R);
|
|
|
+ unsigned w = (statenode->mode & STARPU_W);
|
|
|
|
|
|
ret = _starpu_fetch_data_on_node(handle, 0, r, w, 0);
|
|
|
STARPU_ASSERT(!ret);
|
|
@@ -207,8 +207,8 @@ int _starpu_prefetch_data_on_node_with_mode(starpu_data_handle handle, unsigned
|
|
|
if (!_starpu_attempt_to_submit_data_request_from_apps(handle, mode, _prefetch_data_on_node, &statenode))
|
|
|
{
|
|
|
/* we can immediately proceed */
|
|
|
- uint8_t read = (mode != STARPU_W);
|
|
|
- uint8_t write = (mode != STARPU_R);
|
|
|
+ uint8_t read = (mode & STARPU_R);
|
|
|
+ uint8_t write = (mode & STARPU_W);
|
|
|
_starpu_fetch_data_on_node(handle, node, read, write, async);
|
|
|
|
|
|
/* remove the "lock"/reference */
|