Skip to content

Commit

Permalink
Fixups for esync & fsync rebase
Browse files Browse the repository at this point in the history
Fixes d72230d
Fixes 4bb6f93
  • Loading branch information
Tk-Glitch committed Jul 5, 2024
1 parent 5a63e7a commit 89cdb10
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4288,19 +4288,21 @@ index 42b0f4e6bfd..a78748b96ca 100644
}
else reply->wake_bits = reply->changed_bits = 0;
}
@@ -3493,3 +3521,18 @@ DECL_HANDLER(get_rawinput_devices)
@@ -3493,3 +3521,20 @@ DECL_HANDLER(get_rawinput_devices)
devices[i++] = e->device;
}
}
+
+DECL_HANDLER(esync_msgwait)
+{
+ struct msg_queue *queue = get_current_queue();
+ const queue_shm_t *queue_shm;
+
+ if (!queue) return;
+ queue_shm = queue->shared;
+ queue->esync_in_msgwait = req->in_msgwait;
+
+ if (current->process->idle_event && !(queue->wake_mask & QS_SMRESULT))
+ if (current->process->idle_event && !(queue_shm->wake_mask & QS_SMRESULT))
+ set_event( current->process->idle_event );
+
+ /* and start/stop waiting on the driver */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3318,19 +3318,21 @@ index a78748b96ca..dccf43197cf 100644
if (do_esync() && !is_signaled( queue ))
esync_clear( queue->esync_fd );
}
@@ -3536,3 +3563,18 @@ DECL_HANDLER(esync_msgwait)
@@ -3536,3 +3563,20 @@ DECL_HANDLER(esync_msgwait)
if (queue->fd)
set_fd_events( queue->fd, req->in_msgwait ? POLLIN : 0 );
}
+
+DECL_HANDLER(fsync_msgwait)
+{
+ struct msg_queue *queue = get_current_queue();
+ const queue_shm_t *queue_shm;
+
+ if (!queue) return;
+ queue_shm = queue->shared;
+ queue->fsync_in_msgwait = req->in_msgwait;
+
+ if (current->process->idle_event && !(queue->wake_mask & QS_SMRESULT))
+ if (current->process->idle_event && !(queue_shm->wake_mask & QS_SMRESULT))
+ set_event( current->process->idle_event );
+
+ /* and start/stop waiting on the driver */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3334,19 +3334,21 @@ index a78748b96ca..dccf43197cf 100644
if (do_esync() && !is_signaled( queue ))
esync_clear( queue->esync_fd );
}
@@ -3536,6 +3563,21 @@ DECL_HANDLER(esync_msgwait)
@@ -3536,6 +3563,23 @@ DECL_HANDLER(esync_msgwait)
if (queue->fd)
set_fd_events( queue->fd, req->in_msgwait ? POLLIN : 0 );
}
+
+DECL_HANDLER(fsync_msgwait)
+{
+ struct msg_queue *queue = get_current_queue();
+ const queue_shm_t *queue_shm;
+
+ if (!queue) return;
+ queue_shm = queue->shared;
+ queue->fsync_in_msgwait = req->in_msgwait;
+
+ if (current->process->idle_event && !(queue->wake_mask & QS_SMRESULT))
+ if (current->process->idle_event && !(queue_shm->wake_mask & QS_SMRESULT))
+ set_event( current->process->idle_event );
+
+ /* and start/stop waiting on the driver */
Expand Down

0 comments on commit 89cdb10

Please sign in to comment.