diff options
| author | Zheng Da <zhengda1936@gmail.com> | 2010-01-26 09:14:06 +0100 |
|---|---|---|
| committer | Zheng Da <zhengda1936@gmail.com> | 2010-01-26 09:14:06 +0100 |
| commit | 7f5f5b2136c00c122bc543407f96a890425d32cb (patch) | |
| tree | 5bf753d8e3455661f0a0e06dd67c7d2646e97b38 /libddekit | |
| parent | ff4e243b5be3be650e554a795e54ea428bcaea20 (diff) | |
allocate a port for interrupt delivery.
Diffstat (limited to 'libddekit')
| -rw-r--r-- | libddekit/interrupt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libddekit/interrupt.c b/libddekit/interrupt.c index f3fc10c0..e41a6a68 100644 --- a/libddekit/interrupt.c +++ b/libddekit/interrupt.c @@ -70,10 +70,15 @@ static void intloop(void *arg) { kern_return_t ret; struct intloop_params *params = arg; - mach_port_t delivery_port = mach_port_reply (); + mach_port_t delivery_port; mach_port_t pset, psetcntl; int my_index; + ret = mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, + &delivery_port); + if (ret) + error (2, ret, "mach_port_allocate"); + my_index = params->irq; ddekit_irq_ctrl[my_index].mach_thread = mach_thread_self (); ret = thread_get_assignment (mach_thread_self (), &pset); |
