Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm It turns out...
details: https://anonhg.NetBSD.org/src/rev/2bb90dccbe7e
branches: trunk
changeset: 335881:2bb90dccbe7e
user: skrll <skrll%NetBSD.org@localhost>
date: Wed Jan 28 09:41:04 2015 +0000
description:
It turns out we needed to track pid all along, so revert the lwp tracking
I did ages ago.
quake has a chance of working now.
diffstat:
sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c | 32 +++++-----
sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c | 16 ++--
2 files changed, 24 insertions(+), 24 deletions(-)
diffs (165 lines):
diff -r 745a2ec33902 -r 2bb90dccbe7e sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c
--- a/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c Wed Jan 28 07:32:28 2015 +0000
+++ b/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_arm.c Wed Jan 28 09:41:04 2015 +0000
@@ -120,7 +120,7 @@
struct bulk_waiter_node {
struct bulk_waiter bulk_waiter;
- struct lwp *l;
+ int pid;
struct list_head list;
};
@@ -135,7 +135,7 @@
int connected;
int closing;
- struct lwp *l;
+ int pid;
int mark;
struct list_head bulk_waiter_list;
@@ -527,7 +527,7 @@
if (pargs->is_open) {
status = vchiq_open_service_internal
- (service, (uintptr_t)instance->l);
+ (service, instance->pid);
if (status != VCHIQ_SUCCESS) {
vchiq_remove_service(service->handle);
service = NULL;
@@ -660,7 +660,7 @@
lmutex_lock(&instance->bulk_waiter_list_mutex);
list_for_each(pos, &instance->bulk_waiter_list) {
if (list_entry(pos, struct bulk_waiter_node,
- list)->l == current) {
+ list)->pid == current->l_proc->p_pid) {
waiter = list_entry(pos,
struct bulk_waiter_node,
list);
@@ -672,14 +672,14 @@
lmutex_unlock(&instance->bulk_waiter_list_mutex);
if (!waiter) {
vchiq_log_error(vchiq_arm_log_level,
- "no bulk_waiter found for lwp %p",
- current);
+ "no bulk_waiter found for pid %d",
+ current->l_proc->p_pid);
ret = -ESRCH;
break;
}
vchiq_log_info(vchiq_arm_log_level,
- "found bulk_waiter %x for lwp %p",
- (unsigned int)waiter, current);
+ "found bulk_waiter %x for pid %d",
+ (unsigned int)waiter, current->l_proc->p_pid);
pargs->userdata = &waiter->bulk_waiter;
}
status = vchiq_bulk_transfer
@@ -704,13 +704,13 @@
} else {
const VCHIQ_BULK_MODE_T mode_waiting =
VCHIQ_BULK_MODE_WAITING;
- waiter->l = current;
+ waiter->pid = current->l_proc->p_pid;
lmutex_lock(&instance->bulk_waiter_list_mutex);
list_add(&waiter->list, &instance->bulk_waiter_list);
lmutex_unlock(&instance->bulk_waiter_list_mutex);
vchiq_log_info(vchiq_arm_log_level,
- "saved bulk_waiter %x for lwp %p",
- (unsigned int)waiter, current);
+ "saved bulk_waiter %x for pid %d",
+ (unsigned int)waiter, current->l_proc->p_pid);
pargs->mode = mode_waiting;
}
@@ -1064,7 +1064,7 @@
}
instance->state = state;
- instance->l = l;
+ instance->pid = current->l_proc->p_pid;
#ifdef notyet
ret = vchiq_proc_add_instance(instance);
@@ -1205,8 +1205,8 @@
list_del(pos);
vchiq_log_info(vchiq_arm_log_level,
"bulk_waiter - cleaned up %x "
- "for lwp %p",
- (unsigned int)waiter, waiter->l);
+ "for pid %d",
+ (unsigned int)waiter, waiter->pid);
_sema_destroy(&waiter->bulk_waiter.event);
kfree(waiter);
}
@@ -1297,9 +1297,9 @@
instance = service->instance;
if (instance && !instance->mark) {
len = snprintf(buf, sizeof(buf),
- "Instance %x: lwp %p,%s completions "
+ "Instance %x: pid %d,%s completions "
"%d/%d",
- (unsigned int)instance, instance->l,
+ (unsigned int)instance, instance->pid,
instance->connected ? " connected, " :
"",
instance->completion_insert -
diff -r 745a2ec33902 -r 2bb90dccbe7e sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c
--- a/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c Wed Jan 28 07:32:28 2015 +0000
+++ b/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kern_lib.c Wed Jan 28 09:41:04 2015 +0000
@@ -42,7 +42,7 @@
struct bulk_waiter_node {
struct bulk_waiter bulk_waiter;
- struct lwp *l;
+ int pid;
struct list_head list;
};
@@ -151,8 +151,8 @@
list_del(pos);
vchiq_log_info(vchiq_arm_log_level,
"bulk_waiter - cleaned up %x "
- "for lwp %p",
- (unsigned int)waiter, waiter->l);
+ "for pid %d",
+ (unsigned int)waiter, waiter->pid);
_sema_destroy(&waiter->bulk_waiter.event);
kfree(waiter);
@@ -290,7 +290,7 @@
if (service) {
*phandle = service->handle;
status = vchiq_open_service_internal(service,
- (uintptr_t)current);
+ current->l_proc->p_pid);
if (status != VCHIQ_SUCCESS) {
vchiq_remove_service(service->handle);
*phandle = VCHIQ_SERVICE_HANDLE_INVALID;
@@ -396,7 +396,7 @@
lmutex_lock(&instance->bulk_waiter_list_mutex);
list_for_each(pos, &instance->bulk_waiter_list) {
if (list_entry(pos, struct bulk_waiter_node,
- list)->l == current) {
+ list)->pid == current->l_proc->p_pid) {
waiter = list_entry(pos,
struct bulk_waiter_node,
list);
@@ -448,13 +448,13 @@
kfree(waiter);
} else {
- waiter->l = current;
+ waiter->pid = current->l_proc->p_pid;
lmutex_lock(&instance->bulk_waiter_list_mutex);
list_add(&waiter->list, &instance->bulk_waiter_list);
lmutex_unlock(&instance->bulk_waiter_list_mutex);
vchiq_log_info(vchiq_arm_log_level,
- "saved bulk_waiter %x for lwp %p",
- (unsigned int)waiter, current);
+ "saved bulk_waiter %x for pid %d",
+ (unsigned int)waiter, current->l_proc->p_pid);
}
return status;
Home |
Main Index |
Thread Index |
Old Index