diff options
author | 2019-11-29 06:19:07 +0000 | |
---|---|---|
committer | 2019-11-29 06:19:07 +0000 | |
commit | f4ae6ec74ba8573709e2fb9e4cf17f8d37e54bf3 (patch) | |
tree | 62722e675de18729d44676b2baa44ae514f2fcc2 | |
parent | document use of /var/db/rpki-client/ and /var/cache/rpki-client/ (diff) | |
download | wireguard-openbsd-f4ae6ec74ba8573709e2fb9e4cf17f8d37e54bf3.tar.xz wireguard-openbsd-f4ae6ec74ba8573709e2fb9e4cf17f8d37e54bf3.zip |
drm_sched_entity_flush() doesn't care about specific threads, so just
track the process (and not the original thread of the process).
ok jsg@ kettenis@
-rw-r--r-- | sys/dev/pci/drm/include/drm/gpu_scheduler.h | 2 | ||||
-rw-r--r-- | sys/dev/pci/drm/scheduler/gpu_scheduler.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/drm/include/drm/gpu_scheduler.h b/sys/dev/pci/drm/include/drm/gpu_scheduler.h index 4f33eb0152e..abbc5481430 100644 --- a/sys/dev/pci/drm/include/drm/gpu_scheduler.h +++ b/sys/dev/pci/drm/include/drm/gpu_scheduler.h @@ -89,7 +89,7 @@ struct drm_sched_entity { #ifdef __linux__ struct task_struct *last_user; #else - struct proc *last_user; + struct process *last_user; #endif }; diff --git a/sys/dev/pci/drm/scheduler/gpu_scheduler.c b/sys/dev/pci/drm/scheduler/gpu_scheduler.c index a545c392f01..20883b90053 100644 --- a/sys/dev/pci/drm/scheduler/gpu_scheduler.c +++ b/sys/dev/pci/drm/scheduler/gpu_scheduler.c @@ -267,7 +267,7 @@ long drm_sched_entity_flush(struct drm_sched_entity *entity, long timeout) #ifdef __linux__ struct task_struct *last_user; #else - struct proc *last_user; + struct process *last_user; #endif long ret = timeout; @@ -296,8 +296,8 @@ long drm_sched_entity_flush(struct drm_sched_entity *entity, long timeout) if ((!last_user || last_user == current->group_leader) && (current->flags & PF_EXITING) && (current->exit_code == SIGKILL)) #else - last_user = cmpxchg(&entity->last_user, curproc->p_p->ps_mainproc, NULL); - if ((!last_user || last_user == curproc->p_p->ps_mainproc) && + last_user = cmpxchg(&entity->last_user, curproc->p_p, NULL); + if ((!last_user || last_user == curproc->p_p) && (curproc->p_p->ps_flags & PS_EXITING) && (curproc->p_xstat == SIGKILL)) #endif @@ -544,7 +544,7 @@ void drm_sched_entity_push_job(struct drm_sched_job *sched_job, #ifdef __linux__ WRITE_ONCE(entity->last_user, current->group_leader); #else - WRITE_ONCE(entity->last_user, curproc->p_p->ps_mainproc); + WRITE_ONCE(entity->last_user, curproc->p_p); #endif first = spsc_queue_push(&entity->job_queue, &sched_job->queue_node); |