1.1 --- a/pkg/devices/Control Mon Feb 26 16:18:13 2024 +0100 1.2 +++ b/pkg/devices/Control Tue Feb 27 17:20:03 2024 +0100 1.3 @@ -44,5 +44,5 @@ 1.4 provides: libdrivers-rtc 1.5 provides: libdrivers-spi 1.6 provides: libdrivers-tcu 1.7 -requires: libc libc_be_l4re libdl l4re_c libio libipc 1.8 +requires: libc libc_be_l4re libdl l4re_c libio libipc libsystypes 1.9 Maintainer: paul@boddie.org.uk
2.1 --- a/pkg/devices/lib/dma/src/Makefile Mon Feb 26 16:18:13 2024 +0100 2.2 +++ b/pkg/devices/lib/dma/src/Makefile Tue Feb 27 17:20:03 2024 +0100 2.3 @@ -8,6 +8,6 @@ 2.4 2.5 PRIVATE_INCDIR += $(PKGDIR)/lib/dma/include 2.6 2.7 -REQUIRES_LIBS := l4re_c l4re_c-util libdrivers-common 2.8 +REQUIRES_LIBS := l4re_c l4re_c-util libdrivers-common libsystypes 2.9 2.10 include $(L4DIR)/mk/lib.mk
3.1 --- a/pkg/devices/lib/dma/src/jz4730.cc Mon Feb 26 16:18:13 2024 +0100 3.2 +++ b/pkg/devices/lib/dma/src/jz4730.cc Tue Feb 27 17:20:03 2024 +0100 3.3 @@ -27,8 +27,7 @@ 3.4 #include <l4/sys/rcv_endpoint.h> 3.5 #include <l4/util/util.h> 3.6 3.7 -#include <pthread.h> 3.8 -#include <pthread-l4.h> 3.9 +#include <systypes/thread.h> 3.10 3.11 #include <stdio.h> 3.12 3.13 @@ -339,7 +338,7 @@ 3.14 bool 3.15 Dma_jz4730_channel::wait_for_irq() 3.16 { 3.17 - if (l4_error(l4_rcv_ep_bind_thread(_irq, pthread_l4_cap(pthread_self()), 0))) 3.18 + if (l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0))) 3.19 return false; 3.20 3.21 return !l4_error(l4_irq_receive(_irq, L4_IPC_NEVER)) && _chip->have_interrupt(_channel); 3.22 @@ -351,7 +350,7 @@ 3.23 bool 3.24 Dma_jz4730_channel::wait_for_irq(unsigned int timeout) 3.25 { 3.26 - if (l4_error(l4_rcv_ep_bind_thread(_irq, pthread_l4_cap(pthread_self()), 0))) 3.27 + if (l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0))) 3.28 return false; 3.29 3.30 return !l4_error(l4_irq_receive(_irq, l4_timeout(L4_IPC_TIMEOUT_NEVER, l4util_micros2l4to(timeout)))) && _chip->have_interrupt(_channel);
4.1 --- a/pkg/devices/lib/dma/src/jz4780.cc Mon Feb 26 16:18:13 2024 +0100 4.2 +++ b/pkg/devices/lib/dma/src/jz4780.cc Tue Feb 27 17:20:03 2024 +0100 4.3 @@ -2,7 +2,7 @@ 4.4 * DMA support for the JZ4780. 4.5 * NOTE: This should be combined with the X1600 support. 4.6 * 4.7 - * Copyright (C) 2021, 2023 Paul Boddie <paul@boddie.org.uk> 4.8 + * Copyright (C) 2021, 2023, 2024 Paul Boddie <paul@boddie.org.uk> 4.9 * 4.10 * This program is free software; you can redistribute it and/or 4.11 * modify it under the terms of the GNU General Public License as 4.12 @@ -29,8 +29,7 @@ 4.13 #include <l4/sys/rcv_endpoint.h> 4.14 #include <l4/util/util.h> 4.15 4.16 -#include <pthread.h> 4.17 -#include <pthread-l4.h> 4.18 +#include <systypes/thread.h> 4.19 4.20 #include <stdio.h> 4.21 4.22 @@ -398,7 +397,7 @@ 4.23 { 4.24 if (l4_is_valid_cap(_irq)) 4.25 { 4.26 - if (l4_error(l4_rcv_ep_bind_thread(_irq, pthread_l4_cap(pthread_self()), 0))) 4.27 + if (l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0))) 4.28 return false; 4.29 4.30 return !l4_error(l4_irq_receive(_irq, L4_IPC_NEVER)) && _chip->have_interrupt(_channel); 4.31 @@ -415,7 +414,7 @@ 4.32 { 4.33 if (l4_is_valid_cap(_irq)) 4.34 { 4.35 - if (l4_error(l4_rcv_ep_bind_thread(_irq, pthread_l4_cap(pthread_self()), 0))) 4.36 + if (l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0))) 4.37 return false; 4.38 4.39 return !l4_error(l4_irq_receive(_irq, l4_timeout(L4_IPC_TIMEOUT_NEVER, l4util_micros2l4to(timeout)))) && _chip->have_interrupt(_channel);
5.1 --- a/pkg/devices/lib/dma/src/x1600.cc Mon Feb 26 16:18:13 2024 +0100 5.2 +++ b/pkg/devices/lib/dma/src/x1600.cc Tue Feb 27 17:20:03 2024 +0100 5.3 @@ -27,8 +27,7 @@ 5.4 #include <l4/sys/rcv_endpoint.h> 5.5 #include <l4/util/util.h> 5.6 5.7 -#include <pthread.h> 5.8 -#include <pthread-l4.h> 5.9 +#include <systypes/thread.h> 5.10 5.11 #include <stdio.h> 5.12 5.13 @@ -351,7 +350,7 @@ 5.14 bool 5.15 Dma_x1600_channel::wait_for_irq() 5.16 { 5.17 - if (l4_error(l4_rcv_ep_bind_thread(_irq, pthread_l4_cap(pthread_self()), 0))) 5.18 + if (l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0))) 5.19 return false; 5.20 5.21 return !l4_error(l4_irq_receive(_irq, L4_IPC_NEVER)) && _chip->have_interrupt(_channel); 5.22 @@ -363,7 +362,7 @@ 5.23 bool 5.24 Dma_x1600_channel::wait_for_irq(unsigned int timeout) 5.25 { 5.26 - if (l4_error(l4_rcv_ep_bind_thread(_irq, pthread_l4_cap(pthread_self()), 0))) 5.27 + if (l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0))) 5.28 return false; 5.29 5.30 return !l4_error(l4_irq_receive(_irq, l4_timeout(L4_IPC_TIMEOUT_NEVER, l4util_micros2l4to(timeout)))) && _chip->have_interrupt(_channel);
6.1 --- a/pkg/devices/lib/hdmi/src/Makefile Mon Feb 26 16:18:13 2024 +0100 6.2 +++ b/pkg/devices/lib/hdmi/src/Makefile Tue Feb 27 17:20:03 2024 +0100 6.3 @@ -8,6 +8,6 @@ 6.4 6.5 PRIVATE_INCDIR += $(PKGDIR)/lib/hdmi/include 6.6 6.7 -REQUIRES_LIBS := l4re_c l4re_c-util libdrivers-common 6.8 +REQUIRES_LIBS := l4re_c l4re_c-util libdrivers-common libsystypes 6.9 6.10 include $(L4DIR)/mk/lib.mk
7.1 --- a/pkg/devices/lib/hdmi/src/jz4780.cc Mon Feb 26 16:18:13 2024 +0100 7.2 +++ b/pkg/devices/lib/hdmi/src/jz4780.cc Tue Feb 27 17:20:03 2024 +0100 7.3 @@ -54,8 +54,7 @@ 7.4 #include <l4/sys/rcv_endpoint.h> 7.5 #include <l4/util/util.h> 7.6 7.7 -#include <pthread.h> 7.8 -#include <pthread-l4.h> 7.9 +#include <systypes/thread.h> 7.10 7.11 /* 7.12 I2C pins: 7.13 @@ -763,7 +762,7 @@ 7.14 uint8_t int_status; 7.15 l4_msgtag_t tag; 7.16 7.17 - err = l4_error(l4_rcv_ep_bind_thread(_irq, pthread_l4_cap(pthread_self()), 0)); 7.18 + err = l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0)); 7.19 7.20 if (err) 7.21 return err;
8.1 --- a/pkg/devices/lib/lcd/src/jz4740/Makefile Mon Feb 26 16:18:13 2024 +0100 8.2 +++ b/pkg/devices/lib/lcd/src/jz4740/Makefile Tue Feb 27 17:20:03 2024 +0100 8.3 @@ -8,6 +8,6 @@ 8.4 8.5 PRIVATE_INCDIR += $(PKGDIR)/lib/lcd/include 8.6 8.7 -REQUIRES_LIBS := l4re_c l4re_c-util libdrivers-common 8.8 +REQUIRES_LIBS := l4re_c l4re_c-util libdrivers-common libsystypes 8.9 8.10 include $(L4DIR)/mk/lib.mk
9.1 --- a/pkg/devices/lib/lcd/src/jz4740/lcd-jz4740.cc Mon Feb 26 16:18:13 2024 +0100 9.2 +++ b/pkg/devices/lib/lcd/src/jz4740/lcd-jz4740.cc Tue Feb 27 17:20:03 2024 +0100 9.3 @@ -28,8 +28,7 @@ 9.4 #include <l4/sys/types.h> 9.5 #include <l4/util/util.h> 9.6 9.7 -#include <pthread.h> 9.8 -#include <pthread-l4.h> 9.9 +#include <systypes/thread.h> 9.10 9.11 #include "lcd-jz4740.h" 9.12 #include "lcd-jz4740-config.h" 9.13 @@ -630,7 +629,7 @@ 9.14 9.15 _regs[Lcd_status] = _regs[Lcd_status] & ~(_status_irq()); 9.16 9.17 - long err = l4_error(l4_rcv_ep_bind_thread(_irq, pthread_l4_cap(pthread_self()), 0)); 9.18 + long err = l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0)); 9.19 9.20 if (err) 9.21 return err;
10.1 --- a/pkg/devices/lib/msc/src/Makefile Mon Feb 26 16:18:13 2024 +0100 10.2 +++ b/pkg/devices/lib/msc/src/Makefile Tue Feb 27 17:20:03 2024 +0100 10.3 @@ -8,6 +8,6 @@ 10.4 10.5 PRIVATE_INCDIR += $(PKGDIR)/lib/msc/include 10.6 10.7 -REQUIRES_LIBS := l4re_c l4re_c-util libdrivers-common 10.8 +REQUIRES_LIBS := l4re_c l4re_c-util libdrivers-common libsystypes 10.9 10.10 include $(L4DIR)/mk/lib.mk
11.1 --- a/pkg/devices/lib/msc/src/common.cc Mon Feb 26 16:18:13 2024 +0100 11.2 +++ b/pkg/devices/lib/msc/src/common.cc Tue Feb 27 17:20:03 2024 +0100 11.3 @@ -24,8 +24,7 @@ 11.4 #include <l4/sys/rcv_endpoint.h> 11.5 #include <l4/util/util.h> 11.6 11.7 -#include <pthread.h> 11.8 -#include <pthread-l4.h> 11.9 +#include <systypes/thread.h> 11.10 11.11 #include <math.h> 11.12 #include <stdio.h> 11.13 @@ -449,7 +448,7 @@ 11.14 bool 11.15 Msc_channel::wait_for_irq(uint32_t flags) 11.16 { 11.17 - if (l4_error(l4_rcv_ep_bind_thread(_irq, pthread_l4_cap(pthread_self()), 0))) 11.18 + if (l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0))) 11.19 return false; 11.20 11.21 return !l4_error(l4_irq_receive(_irq, L4_IPC_NEVER)) && 11.22 @@ -462,7 +461,7 @@ 11.23 bool 11.24 Msc_channel::wait_for_irq(uint32_t flags, unsigned int timeout) 11.25 { 11.26 - if (l4_error(l4_rcv_ep_bind_thread(_irq, pthread_l4_cap(pthread_self()), 0))) 11.27 + if (l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0))) 11.28 return false; 11.29 11.30 return !l4_error(l4_irq_receive(_irq, l4_timeout(L4_IPC_TIMEOUT_NEVER,
12.1 --- a/pkg/devices/lib/tcu/src/Makefile Mon Feb 26 16:18:13 2024 +0100 12.2 +++ b/pkg/devices/lib/tcu/src/Makefile Tue Feb 27 17:20:03 2024 +0100 12.3 @@ -8,6 +8,6 @@ 12.4 12.5 PRIVATE_INCDIR += $(PKGDIR)/lib/tcu/include 12.6 12.7 -REQUIRES_LIBS := l4re_c l4re_c-util libdrivers-common 12.8 +REQUIRES_LIBS := l4re_c l4re_c-util libdrivers-common libsystypes 12.9 12.10 include $(L4DIR)/mk/lib.mk
13.1 --- a/pkg/devices/lib/tcu/src/common.cc Mon Feb 26 16:18:13 2024 +0100 13.2 +++ b/pkg/devices/lib/tcu/src/common.cc Tue Feb 27 17:20:03 2024 +0100 13.3 @@ -25,8 +25,7 @@ 13.4 #include <l4/sys/rcv_endpoint.h> 13.5 #include <l4/util/util.h> 13.6 13.7 -#include <pthread.h> 13.8 -#include <pthread-l4.h> 13.9 +#include <systypes/thread.h> 13.10 13.11 #include <math.h> // log2 13.12 13.13 @@ -273,7 +272,7 @@ 13.14 bool 13.15 Tcu_channel::wait_for_irq() 13.16 { 13.17 - if (l4_error(l4_rcv_ep_bind_thread(_irq, pthread_l4_cap(pthread_self()), 0))) 13.18 + if (l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0))) 13.19 return false; 13.20 13.21 bool irq = !l4_error(l4_irq_receive(_irq, L4_IPC_NEVER)) && have_interrupt(); 13.22 @@ -290,7 +289,7 @@ 13.23 bool 13.24 Tcu_channel::wait_for_irq(unsigned int timeout) 13.25 { 13.26 - if (l4_error(l4_rcv_ep_bind_thread(_irq, pthread_l4_cap(pthread_self()), 0))) 13.27 + if (l4_error(l4_rcv_ep_bind_thread(_irq, get_current_thread(), 0))) 13.28 return false; 13.29 13.30 bool irq = !l4_error(l4_irq_receive(_irq, l4_timeout(L4_IPC_TIMEOUT_NEVER, l4util_micros2l4to(timeout)))) && have_interrupt();