1.1 --- a/pkg/devices/lib/dma/src/jz4780.cc Mon Feb 26 16:18:13 2024 +0100
1.2 +++ b/pkg/devices/lib/dma/src/jz4780.cc Tue Feb 27 17:20:03 2024 +0100
1.3 @@ -2,7 +2,7 @@
1.4 * DMA support for the JZ4780.
1.5 * NOTE: This should be combined with the X1600 support.
1.6 *
1.7 - * Copyright (C) 2021, 2023 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2021, 2023, 2024 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -29,8 +29,7 @@
1.13 #include <l4/sys/rcv_endpoint.h>
1.14 #include <l4/util/util.h>
1.15
1.16 -#include <pthread.h>
1.17 -#include <pthread-l4.h>
1.18 +#include <systypes/thread.h>
1.19
1.20 #include <stdio.h>
1.21
1.22 @@ -398,7 +397,7 @@
1.23 {
1.24 if (l4_is_valid_cap(_irq))
1.25 {
1.26 - if (l4_error(l4_rcv_ep_bind_thread(_irq, pthread_l4_cap(pthread_self()), 0)))
1.27 + if (l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0)))
1.28 return false;
1.29
1.30 return !l4_error(l4_irq_receive(_irq, L4_IPC_NEVER)) && _chip->have_interrupt(_channel);
1.31 @@ -415,7 +414,7 @@
1.32 {
1.33 if (l4_is_valid_cap(_irq))
1.34 {
1.35 - if (l4_error(l4_rcv_ep_bind_thread(_irq, pthread_l4_cap(pthread_self()), 0)))
1.36 + if (l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0)))
1.37 return false;
1.38
1.39 return !l4_error(l4_irq_receive(_irq, l4_timeout(L4_IPC_TIMEOUT_NEVER, l4util_micros2l4to(timeout)))) && _chip->have_interrupt(_channel);