From: kosmirror <kos...@us...> - 2025-05-15 05:07:10
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 0d2c2328792f470d9b71c7fc35808c0aaea14371 (commit) via 8d6ef3f3bf1bb214a7eb4df6725447607d18cfc8 (commit) via 485e858478566403c3c3c1ca9667ad730c4355b2 (commit) via 2c5b13437d11088f791687fa254510f894f6a63b (commit) via 09dd6ec621b939cbca75ec1303b946f8147f151a (commit) via bc4d0b083373d386991c0ab98bddda7fa45156d2 (commit) via 1ea69409c29cbcf6f57eb15135322c93bbffd0a5 (commit) via 2982fbecf1a419c9c6784e6663ff9e50b6051400 (commit) via 7f38a674b0b7eb61bbf98a7f02c48f1b481bbb6b (commit) via d0a08cf946acf82a7483a60eb0ee9cd7eff776b8 (commit) via de6feb24c33b81a2669c89ab1030b0e70c7924a0 (commit) via bfc841833c17f99435664dccdb4401e39ad3c92a (commit) via 2da06361c09320c300189834b5fb5d5353243bd4 (commit) via 3ad38674588efa1d3b82bd8a2b40204b44b2df4c (commit) via b21e0bf3af04ea175531d0b02d7459e116c7ffc0 (commit) via 07404a2e9b2e2bef79eed461e9ea379aafe72824 (commit) via 768ac05cdc8a78b7aebeb31be361cee8dc893405 (commit) via 23cecd496352490b3d699e4f2ea8e81b357867ac (commit) via ec9d1ceaebcfc659ae3129082837b613955e7554 (commit) via ff0789129478fe584f42874a722cf152555981e6 (commit) via 2746498dc54fc5961318b6ddca30535a1a9f9cdc (commit) via 980b8e58373bdffebe2473e15e8bb41d30cd1ccb (commit) via 779af3a2febd5804ad22b9be3c6fae6b746d1c55 (commit) via 70e50124d1903ddd68611c1630ddb1a3669b9fa0 (commit) via 4963607accbeee5b1e5adb6a9428717046a3b1ef (commit) via 32b849fff162b74cfbd8723fd45a29649688b6ca (commit) via 3a7bce6d929e2d4a97be3a6c482aeeb3e9fcefd2 (commit) via a31208545e2976dc946b40e585a4c89e84ae4eec (commit) via 72be9462b31f5da5d4a6161ef5198c553dfa5bca (commit) via 003fbe64373c818286fdf1ec4b8cb4b0fbc97bfc (commit) via d42da44b54512a7d403ec85b8a27bdf797b4ae8c (commit) via a3563806abdda790d3cf79129ab513e6bc951a46 (commit) via 9e7557a5e06a6d693cd02208aac9a8e2521990e8 (commit) via 88f2b95fb94a399d3b5d44af1ffc4be8019d261d (commit) via fdf71759599551990e70f0018039785fe72394bd (commit) via 9e9fd275d6f6d8cf3a0a671f0e972d8a26141ccd (commit) via 121aec023822073812f3b009a0d2c6cf650f1bcc (commit) via 97d2c432224e701da929f110b2d536adfc5e3126 (commit) via 42728924c571cb6be9f318ca6a7d8667c4033914 (commit) via 023db79ebecc9451e1181f7545e8fa5ea52429aa (commit) via 2daf1dad93c56c3dbc72d0d61a67c68bd9abd8cd (commit) via 828872948aa165a6ddc3646e6683f827acba60eb (commit) via bce53fc101c3315cb8ab47de5dbb1d60359820db (commit) via f6c5261203c79fc3066e079ed95c270b99cbe723 (commit) via 1aa34a837ad3bae70b6902198dd4c6d987ed8a42 (commit) via 60421d6ecf96d335dd77d3e3deaaa1cedc66535b (commit) via eadd691dd033e6a219582cb16f3bb60e5d2cb34f (commit) via b359ae2677dd9eedc0aaa3bbb85ebd54e2e3d1d2 (commit) via 6186b354cf9fed7390436f728f467b58d558a93e (commit) via 58f94644d5fe509168c621bd9069d2e793b34259 (commit) via 5c3250c3d6898741219f4d8806af548476fa2c40 (commit) via bbffcb927c8a266eda6617f7be64e34aee9dac62 (commit) via e2ffec70a5578ba10a65f8b45e686058e571b275 (commit) via d886185c6035c9a552b5062ff0c9cdd02bc24dcd (commit) via ae290a7896364d7014d5e05135a64fd9742b7f94 (commit) via 934fbcfb4371defff3baa2c46a9b7377806ba66d (commit) via 5f5ebb62f8771e01b94808149c31a52279e6e6b3 (commit) via ed6b7c1c0de06e0197dfc9da8a166130665ca580 (commit) via 9d1d93750d208cf01595a24b41e39ef83c0d38ed (commit) via 64e937d69c9f087503ce84759ece6d8c5204fbee (commit) via e931da9cda3d70d6a61b729c710bf064a8ba8ecb (commit) via af9b2f600f80bd9e2c12f25324fbcf10b04a27bd (commit) via c24867189bc311aa4029cac78037b6862ba0ebfa (commit) via 87289bdc1d56b48d96ac0215c5ff6843efc4ac3c (commit) via 0002c120d02be35cf4112fd2f882f520028f73a9 (commit) via 2c78971926c0cccacb770f9735a62874440ccaf7 (commit) via b261906e9b032cbc7a4cc887b611c84ab961c207 (commit) via 81a9bc609bcadf3f0c6c69b76e409665ec9821bb (commit) via c6f1342b544c047682ac5bbe1cce9168d4768898 (commit) via 60eb61f025446557a41723559e5000130fefc678 (commit) via d30d41bbb3275b584733d0d5d906b1802a7b1f07 (commit) via 3439f217fcb1e814604df3b9dbe0b1d1e4479049 (commit) via 93ffa86838022817d586de25eaba129eff509ca1 (commit) via d65978a8d90eba676946e966f5cd09510b2746df (commit) via 2fd07131a428445d21170b92fc024c2c256e97ca (commit) via 8d5662e4918bfc859ab509a369f3ec4ac108402f (commit) via d6211e47cde27eac3bbeb7f057cccd37b085a746 (commit) via 4fbdd1ce38ca82ab322438e75c6aab6dbc36396b (commit) via 980772a00645c3c42e00679612ea0fd3009f06c2 (commit) via 65286eb0023170b51309917cc993b2fa6162e2d9 (commit) via 86bcf15ad7c4a8158517bbb8e619ada2ff14ce0c (commit) via adc3958020006187adeb57166a25de9b199fafcf (commit) via 1ee18d89a686add380da5a019174700a259681cc (commit) via ab88f7661d1f9e9fbb4d6b29b9775d1db4b46058 (commit) via 1e6f8eb37ae92aca4d9c73c46eb7359b97eee0d2 (commit) via 21b5df1e9c3557f1b8c8f323c32f83b9e532eef3 (commit) from 1aaa930bf1050ef8116bf23527eba95a16da6efb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0d2c2328792f470d9b71c7fc35808c0aaea14371 Author: QuzarDC <qu...@co...> Date: Sun May 11 21:01:34 2025 -0400 Remove unnecessary <arch/types.h> includes. To help address #840 and generally clean up. It seems many of the files have been transitioned over to stdint, but the includes weren't removed. In cond.h also added a missing void for cond_init. commit 8d6ef3f3bf1bb214a7eb4df6725447607d18cfc8 Author: QuzarDC <qu...@co...> Date: Sun May 11 20:57:24 2025 -0400 Add missing includes. These are needed for __unlikely in perfctr, and old-style types in ramdisk/pty (but dosn't need to be shared in their headers). commit 485e858478566403c3c3c1ca9667ad730c4355b2 Author: QuzarDC <qu...@co...> Date: Sun May 11 20:14:18 2025 -0400 nmmgr Use stdint types. commit 2c5b13437d11088f791687fa254510f894f6a63b Author: QuzarDC <qu...@co...> Date: Sun May 11 19:58:10 2025 -0400 malloc Remove include of <arch/types.h> commit 09dd6ec621b939cbca75ec1303b946f8147f151a Merge: 1ea69409 bc4d0b08 Author: Lawrence Sebald <ljs...@us...> Date: Thu May 15 00:58:15 2025 -0400 Merge pull request #1001 from pcercuei/sync-sourceforge CI: Automatically sync to SourceForge commit bc4d0b083373d386991c0ab98bddda7fa45156d2 Author: Lawrence Sebald <ljs...@us...> Date: Thu May 15 00:57:34 2025 -0400 Apply suggestions from code review commit 1ea69409c29cbcf6f57eb15135322c93bbffd0a5 Author: QuzarDC <qu...@co...> Date: Mon May 12 11:08:49 2025 -0400 Fix printf format types for pvr_stats members in GL examples. These were changed in #471 and the examples hadn't been updated to reflect the new sizes. commit 2982fbecf1a419c9c6784e6663ff9e50b6051400 Author: QuzarDC <qu...@co...> Date: Tue May 13 14:21:33 2025 -0400 Roll back bad pointer math update for arch_exec_at. From #923 commit 7f38a674b0b7eb61bbf98a7f02c48f1b481bbb6b Author: QuzarDC <qu...@co...> Date: Sun May 11 21:43:02 2025 -0400 Fix mismatched types for ubc callback. `ubc.h` is using the irq_context type but for some reason wasn't using the typedef'd name for it, and wasn't including `irq.h` either. This fixes the use of it in gcc14+ ----------------------------------------------------------------------- Summary of changes: .github/workflows/sourceforge.yml | 26 + AUTHORS | 24 +- README.md | 2 +- addons/libkosext2fs/inode.c | 1 + addons/libkosutils/netcfg.c | 2 + addons/libpthread/Makefile | 71 ++ .../{libkosext2fs => libpthread}/kos/dreamcast.cnf | 0 addons/libpthread/pthread-internal.h | 84 ++ addons/libpthread/pthread_atfork.c | 18 + addons/libpthread/pthread_attr_destroy.c | 19 + addons/libpthread/pthread_attr_getdetachstate.c | 20 + addons/libpthread/pthread_attr_getguardsize.c | 21 + addons/libpthread/pthread_attr_getname_np.c | 33 + addons/libpthread/pthread_attr_getschedparam.c | 22 + addons/libpthread/pthread_attr_getscope.c | 21 + addons/libpthread/pthread_attr_getstack.c | 24 + addons/libpthread/pthread_attr_getstacksize.c | 21 + addons/libpthread/pthread_attr_init.c | 26 + addons/libpthread/pthread_attr_setdetachstate.c | 21 + addons/libpthread/pthread_attr_setguardsize.c | 19 + addons/libpthread/pthread_attr_setname_np.c | 35 + addons/libpthread/pthread_attr_setschedparam.c | 26 + addons/libpthread/pthread_attr_setscope.c | 19 + addons/libpthread/pthread_attr_setstack.c | 30 + addons/libpthread/pthread_attr_setstacksize.c | 21 + addons/libpthread/pthread_barrier_destroy.c | 16 + addons/libpthread/pthread_barrier_init.c | 18 + addons/libpthread/pthread_barrier_wait.c | 16 + addons/libpthread/pthread_barrierattr_destroy.c | 19 + addons/libpthread/pthread_barrierattr_init.c | 19 + addons/libpthread/pthread_cancel.c | 15 + addons/libpthread/pthread_cond_broadcast.c | 22 + addons/libpthread/pthread_cond_destroy.c | 22 + addons/libpthread/pthread_cond_init.c | 32 + addons/libpthread/pthread_cond_signal.c | 22 + addons/libpthread/pthread_cond_timedwait.c | 45 + addons/libpthread/pthread_cond_wait.c | 23 + addons/libpthread/pthread_condattr_destroy.c | 19 + addons/libpthread/pthread_condattr_getclock.c | 20 + addons/libpthread/pthread_condattr_init.c | 22 + addons/libpthread/pthread_condattr_setclock.c | 29 + addons/libpthread/pthread_create.c | 29 + addons/libpthread/pthread_detach.c | 21 + addons/libpthread/pthread_equal.c | 12 + addons/libpthread/pthread_exit.c | 13 + addons/libpthread/pthread_getname_np.c | 38 + addons/libpthread/pthread_getprio.c | 19 + addons/libpthread/pthread_getsetconcurrency.c | 29 + addons/libpthread/pthread_getspecific.c | 13 + addons/libpthread/pthread_join.c | 26 + addons/libpthread/pthread_key_create.c | 13 + addons/libpthread/pthread_key_delete.c | 13 + addons/libpthread/pthread_mutex_consistent.c | 19 + addons/libpthread/pthread_mutex_destroy.c | 22 + addons/libpthread/pthread_mutex_init.c | 42 + addons/libpthread/pthread_mutex_lock.c | 22 + addons/libpthread/pthread_mutex_timedlock.c | 50 + addons/libpthread/pthread_mutex_trylock.c | 22 + addons/libpthread/pthread_mutex_unlock.c | 22 + addons/libpthread/pthread_mutexattr_destroy.c | 19 + addons/libpthread/pthread_mutexattr_getrobust.c | 22 + addons/libpthread/pthread_mutexattr_gettype.c | 22 + addons/libpthread/pthread_mutexattr_init.c | 19 + addons/libpthread/pthread_mutexattr_setrobust.c | 22 + addons/libpthread/pthread_mutexattr_settype.c | 26 + addons/libpthread/pthread_once.c | 13 + addons/libpthread/pthread_rwlock_destroy.c | 27 + addons/libpthread/pthread_rwlock_init.c | 30 + addons/libpthread/pthread_rwlock_rdlock.c | 27 + addons/libpthread/pthread_rwlock_timedrdlock.c | 50 + addons/libpthread/pthread_rwlock_timedwrlock.c | 50 + addons/libpthread/pthread_rwlock_tryrdlock.c | 27 + addons/libpthread/pthread_rwlock_trywrlock.c | 27 + addons/libpthread/pthread_rwlock_unlock.c | 27 + addons/libpthread/pthread_rwlock_wrlock.c | 27 + addons/libpthread/pthread_rwlockattr_destroy.c | 19 + addons/libpthread/pthread_rwlockattr_init.c | 19 + addons/libpthread/pthread_self.c | 13 + addons/libpthread/pthread_setcancelstate.c | 16 + addons/libpthread/pthread_setcanceltype.c | 16 + addons/libpthread/pthread_setname_np.c | 31 + addons/libpthread/pthread_setprio.c | 25 + addons/libpthread/pthread_setspecific.c | 13 + addons/libpthread/pthread_spin_destroy.c | 18 + addons/libpthread/pthread_spin_init.c | 20 + addons/libpthread/pthread_spin_lock.c | 14 + addons/libpthread/pthread_spin_trylock.c | 19 + addons/libpthread/pthread_spin_unlock.c | 14 + addons/libpthread/pthread_testcancel.c | 11 + addons/libpthread/pthread_yield.c | 14 + doc/CHANGELOG.md | 4 + doc/RELNOTES.md | 8 + doc/license/LICENSE.KOS | 4 +- examples/dreamcast/basic/breaking/breaking.c | 3 + .../threading/{spinlock_test => barrier}/Makefile | 6 +- .../dreamcast/basic/threading/barrier/barrier.c | 196 ++++ examples/dreamcast/gldc/basic/gl/gltest.c | 2 +- .../dreamcast/gldc/benchmarks/quadmark/quadmark.c | 2 +- .../dreamcast/gldc/benchmarks/trimark/trimark.c | 2 +- .../gldc/benchmarks/tristripmark/tristripmark.c | 2 +- examples/dreamcast/libdream/vmu/vmu.c | 2 + examples/dreamcast/network/dns-client/dns-client.c | 1 + examples/dreamcast/network/httpd/httpd.c | 3 + examples/dreamcast/network/ntp/ntp.c | 2 + .../dreamcast/network/speedtest/handle_request.c | 3 + examples/dreamcast/network/speedtest/server.c | 1 + examples/dreamcast/network/udpecho6/echo.c | 1 + examples/dreamcast/pthread/Makefile | 14 + .../threading/once => pthread/general}/Makefile | 11 +- .../pthread/general/general_pthread_test.c | 230 ++++ examples/dreamcast/rumble/rumble.c | 1 + examples/dreamcast/sound/hello-opus/opustest.c | 1 + include/kos.h | 1 + include/kos/barrier.h | 143 +++ include/kos/cond.h | 3 +- include/kos/dbglog.h | 4 - include/kos/fs_dev.h | 4 +- include/kos/fs_null.h | 4 +- include/kos/fs_pty.h | 5 +- include/kos/fs_ramdisk.h | 5 +- include/kos/fs_random.h | 4 +- include/kos/init.h | 54 +- include/kos/library.h | 2 +- include/kos/nmmgr.h | 10 +- include/kos/thread.h | 40 +- include/malloc.h | 2 - include/pthread.h | 492 ++++---- include/sys/_pthread.h | 12 +- include/sys/_pthreadtypes.h | 103 ++ include/sys/_types.h | 4 +- include/sys/sched.h | 51 +- kernel/arch/dreamcast/exports-naomi.txt | 24 +- kernel/arch/dreamcast/exports-pristine.txt | 33 +- kernel/arch/dreamcast/hardware/Makefile | 2 +- kernel/arch/dreamcast/hardware/biosfont.c | 1 + kernel/arch/dreamcast/hardware/cdrom.c | 368 ++++-- kernel/arch/dreamcast/hardware/dmac.c | 12 +- kernel/arch/dreamcast/hardware/g1ata.c | 44 +- .../arch/dreamcast/hardware/maple/maple_driver.c | 57 +- kernel/arch/dreamcast/hardware/sci.c | 1178 ++++++++++++++++++++ kernel/arch/dreamcast/hardware/ubc.c | 1 - kernel/arch/dreamcast/include/arch/cache.h | 1 - kernel/arch/dreamcast/include/arch/init_flags.h | 22 +- kernel/arch/dreamcast/include/arch/irq.h | 8 +- kernel/arch/dreamcast/include/arch/mmu.h | 1 - kernel/arch/dreamcast/include/arch/stack.h | 2 +- kernel/arch/dreamcast/include/arch/trap.h | 6 +- kernel/arch/dreamcast/include/dc/biosfont.h | 2 - kernel/arch/dreamcast/include/dc/cdrom.h | 19 +- kernel/arch/dreamcast/include/dc/fmath.h | 14 +- kernel/arch/dreamcast/include/dc/fs_iso9660.h | 1 - kernel/arch/dreamcast/include/dc/g2bus.h | 1 - kernel/arch/dreamcast/include/dc/maple.h | 22 + .../arch/dreamcast/include/dc/maple/controller.h | 1 - kernel/arch/dreamcast/include/dc/maple/keyboard.h | 1 - kernel/arch/dreamcast/include/dc/maple/vmu.h | 1 - kernel/arch/dreamcast/include/dc/math.h | 12 +- kernel/arch/dreamcast/include/dc/pvr.h | 197 +--- kernel/arch/dreamcast/include/dc/pvr/pvr_header.h | 363 ++++++ kernel/arch/dreamcast/include/dc/sci.h | 276 +++++ kernel/arch/dreamcast/include/dc/sound/sfxmgr.h | 1 - kernel/arch/dreamcast/include/dc/spu.h | 1 - kernel/arch/dreamcast/include/dc/sq.h | 1 - kernel/arch/dreamcast/include/dc/ubc.h | 7 +- kernel/arch/dreamcast/kernel/exec.c | 2 +- kernel/arch/dreamcast/kernel/init.c | 60 +- kernel/arch/dreamcast/kernel/perfctr.c | 1 + .../arch/dreamcast/kernel/{startup.s => startup.S} | 2 + kernel/arch/dreamcast/math/math.s | 40 +- kernel/arch/dreamcast/util/vmu_pkg.c | 1 + kernel/exports/library.c | 4 +- kernel/fs/fs_dev.c | 8 +- kernel/fs/fs_null.c | 9 +- kernel/fs/fs_pty.c | 20 +- kernel/fs/fs_ramdisk.c | 20 +- kernel/fs/fs_random.c | 9 +- kernel/fs/fs_utils.c | 1 + kernel/libc/Makefile | 4 +- kernel/libc/koslib/dbglog.c | 1 + kernel/libc/koslib/getaddrinfo.c | 1 + kernel/libc/koslib/realpath.c | 2 + kernel/libc/pthreads/Makefile | 13 - kernel/libc/pthreads/pthread_cond.c | 93 -- kernel/libc/pthreads/pthread_mutex.c | 113 -- kernel/libc/pthreads/pthread_thd.c | 78 -- kernel/libc/pthreads/pthread_thd_attr.c | 172 --- kernel/libc/pthreads/pthread_tls.c | 34 - kernel/net/net_dhcp.c | 1 + kernel/net/net_tcp.c | 1 + kernel/thread/Makefile | 4 +- kernel/thread/barrier.c | 201 ++++ kernel/thread/thread.c | 32 +- utils/dc-chain/Makefile.default.cfg | 6 +- utils/dc-chain/scripts/newlib.mk | 1 + utils/dc-chain/scripts/patch.mk | 2 +- 195 files changed, 5816 insertions(+), 1329 deletions(-) create mode 100644 .github/workflows/sourceforge.yml create mode 100644 addons/libpthread/Makefile copy addons/{libkosext2fs => libpthread}/kos/dreamcast.cnf (100%) create mode 100644 addons/libpthread/pthread-internal.h create mode 100644 addons/libpthread/pthread_atfork.c create mode 100644 addons/libpthread/pthread_attr_destroy.c create mode 100644 addons/libpthread/pthread_attr_getdetachstate.c create mode 100644 addons/libpthread/pthread_attr_getguardsize.c create mode 100644 addons/libpthread/pthread_attr_getname_np.c create mode 100644 addons/libpthread/pthread_attr_getschedparam.c create mode 100644 addons/libpthread/pthread_attr_getscope.c create mode 100644 addons/libpthread/pthread_attr_getstack.c create mode 100644 addons/libpthread/pthread_attr_getstacksize.c create mode 100644 addons/libpthread/pthread_attr_init.c create mode 100644 addons/libpthread/pthread_attr_setdetachstate.c create mode 100644 addons/libpthread/pthread_attr_setguardsize.c create mode 100644 addons/libpthread/pthread_attr_setname_np.c create mode 100644 addons/libpthread/pthread_attr_setschedparam.c create mode 100644 addons/libpthread/pthread_attr_setscope.c create mode 100644 addons/libpthread/pthread_attr_setstack.c create mode 100644 addons/libpthread/pthread_attr_setstacksize.c create mode 100644 addons/libpthread/pthread_barrier_destroy.c create mode 100644 addons/libpthread/pthread_barrier_init.c create mode 100644 addons/libpthread/pthread_barrier_wait.c create mode 100644 addons/libpthread/pthread_barrierattr_destroy.c create mode 100644 addons/libpthread/pthread_barrierattr_init.c create mode 100644 addons/libpthread/pthread_cancel.c create mode 100644 addons/libpthread/pthread_cond_broadcast.c create mode 100644 addons/libpthread/pthread_cond_destroy.c create mode 100644 addons/libpthread/pthread_cond_init.c create mode 100644 addons/libpthread/pthread_cond_signal.c create mode 100644 addons/libpthread/pthread_cond_timedwait.c create mode 100644 addons/libpthread/pthread_cond_wait.c create mode 100644 addons/libpthread/pthread_condattr_destroy.c create mode 100644 addons/libpthread/pthread_condattr_getclock.c create mode 100644 addons/libpthread/pthread_condattr_init.c create mode 100644 addons/libpthread/pthread_condattr_setclock.c create mode 100644 addons/libpthread/pthread_create.c create mode 100644 addons/libpthread/pthread_detach.c create mode 100644 addons/libpthread/pthread_equal.c create mode 100644 addons/libpthread/pthread_exit.c create mode 100644 addons/libpthread/pthread_getname_np.c create mode 100644 addons/libpthread/pthread_getprio.c create mode 100644 addons/libpthread/pthread_getsetconcurrency.c create mode 100644 addons/libpthread/pthread_getspecific.c create mode 100644 addons/libpthread/pthread_join.c create mode 100644 addons/libpthread/pthread_key_create.c create mode 100644 addons/libpthread/pthread_key_delete.c create mode 100644 addons/libpthread/pthread_mutex_consistent.c create mode 100644 addons/libpthread/pthread_mutex_destroy.c create mode 100644 addons/libpthread/pthread_mutex_init.c create mode 100644 addons/libpthread/pthread_mutex_lock.c create mode 100644 addons/libpthread/pthread_mutex_timedlock.c create mode 100644 addons/libpthread/pthread_mutex_trylock.c create mode 100644 addons/libpthread/pthread_mutex_unlock.c create mode 100644 addons/libpthread/pthread_mutexattr_destroy.c create mode 100644 addons/libpthread/pthread_mutexattr_getrobust.c create mode 100644 addons/libpthread/pthread_mutexattr_gettype.c create mode 100644 addons/libpthread/pthread_mutexattr_init.c create mode 100644 addons/libpthread/pthread_mutexattr_setrobust.c create mode 100644 addons/libpthread/pthread_mutexattr_settype.c create mode 100644 addons/libpthread/pthread_once.c create mode 100644 addons/libpthread/pthread_rwlock_destroy.c create mode 100644 addons/libpthread/pthread_rwlock_init.c create mode 100644 addons/libpthread/pthread_rwlock_rdlock.c create mode 100644 addons/libpthread/pthread_rwlock_timedrdlock.c create mode 100644 addons/libpthread/pthread_rwlock_timedwrlock.c create mode 100644 addons/libpthread/pthread_rwlock_tryrdlock.c create mode 100644 addons/libpthread/pthread_rwlock_trywrlock.c create mode 100644 addons/libpthread/pthread_rwlock_unlock.c create mode 100644 addons/libpthread/pthread_rwlock_wrlock.c create mode 100644 addons/libpthread/pthread_rwlockattr_destroy.c create mode 100644 addons/libpthread/pthread_rwlockattr_init.c create mode 100644 addons/libpthread/pthread_self.c create mode 100644 addons/libpthread/pthread_setcancelstate.c create mode 100644 addons/libpthread/pthread_setcanceltype.c create mode 100644 addons/libpthread/pthread_setname_np.c create mode 100644 addons/libpthread/pthread_setprio.c create mode 100644 addons/libpthread/pthread_setspecific.c create mode 100644 addons/libpthread/pthread_spin_destroy.c create mode 100644 addons/libpthread/pthread_spin_init.c create mode 100644 addons/libpthread/pthread_spin_lock.c create mode 100644 addons/libpthread/pthread_spin_trylock.c create mode 100644 addons/libpthread/pthread_spin_unlock.c create mode 100644 addons/libpthread/pthread_testcancel.c create mode 100644 addons/libpthread/pthread_yield.c copy examples/dreamcast/basic/threading/{spinlock_test => barrier}/Makefile (78%) create mode 100644 examples/dreamcast/basic/threading/barrier/barrier.c create mode 100644 examples/dreamcast/pthread/Makefile copy examples/dreamcast/{basic/threading/once => pthread/general}/Makefile (61%) create mode 100644 examples/dreamcast/pthread/general/general_pthread_test.c create mode 100644 include/kos/barrier.h create mode 100644 include/sys/_pthreadtypes.h create mode 100644 kernel/arch/dreamcast/hardware/sci.c create mode 100644 kernel/arch/dreamcast/include/dc/pvr/pvr_header.h create mode 100644 kernel/arch/dreamcast/include/dc/sci.h rename kernel/arch/dreamcast/kernel/{startup.s => startup.S} (99%) delete mode 100644 kernel/libc/pthreads/Makefile delete mode 100644 kernel/libc/pthreads/pthread_cond.c delete mode 100644 kernel/libc/pthreads/pthread_mutex.c delete mode 100644 kernel/libc/pthreads/pthread_thd.c delete mode 100644 kernel/libc/pthreads/pthread_thd_attr.c delete mode 100644 kernel/libc/pthreads/pthread_tls.c create mode 100644 kernel/thread/barrier.c diff --git a/.github/workflows/sourceforge.yml b/.github/workflows/sourceforge.yml new file mode 100644 index 00000000..47d6d61e --- /dev/null +++ b/.github/workflows/sourceforge.yml @@ -0,0 +1,26 @@ +name: Sourceforge sync + +on: + push: + branches: + - master + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: setup-ssh + run: | + install -m 600 -D /dev/null ~/.ssh/id_ed25519 + echo "${{ secrets.SF_MIRROR_KEY }}" > ~/.ssh/id_ed25519 + ssh-keyscan -H git.code.sf.net > ~/.ssh/known_hosts + + - name: sourceforge-sync + run: | + git remote add sourceforge ssh://kos...@gi.../p/cadcdev/kallistios + git push sourceforge master diff --git a/AUTHORS b/AUTHORS index 333e288c..82715c88 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,7 +22,7 @@ please see the README.KOS file in the doc directory. Contributors list (under the normal KOS license): ------------------------------------------------- Megan Potter: 1997, 2000, 2001, 2002, 2003, 2004 -Lawrence Sebald: 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 +Lawrence Sebald: 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Sam Steele: 2004 Gil Megidish: 2002 Florian Schulze: 2002 @@ -44,33 +44,13 @@ Stefan Galowicz: 2016, 2017 Luke Benstead: 2020, 2021, 2022, 2023 Eric Fradella: 2023, 2024, 2025 Falco Girgis: 2023, 2024, 2025 -Ruslan Rostovtsev: 2014, 2016, 2023, 2024 +Ruslan Rostovtsev: 2014, 2016, 2023, 2024, 2025 Colton Pawielski: 2023 Andy Barajas: 2023, 2024 Paul Cercueil: 2023, 2024, 2025 Files with Specific licenses: ----------------------------- -include/pthread.h: -/* pthread.h - * - * Written by Joel Sherrill <jo...@OA...>. - * - * COPYRIGHT (c) 1989-2000. - * On-Line Applications Research Corporation (OAR). - * - * Permission to use, copy, modify, and distribute this software for any - * purpose without fee is hereby granted, provided that this entire notice - * is included in all copies of any software which is or includes a copy - * or modification of this software. - * - * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION - * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS - * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - * - */ - kernel/arch/dreamcast/kernel/gdb_stub.c: /* This is originally based on an m68k software stub written by Glenn Engel at HP, but has changed quite a bit. diff --git a/README.md b/README.md index 10618ec6..2099def8 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ KallistiOS also features a package manager called [**_kos-ports_**](https://gith * Optical Disc Drive * Low-level 3D PowerVR Graphics * SH4 ASM-Optimized Math Routines -* SH4 SCIF Serial I/O +* SH4 SCI and SCIF Serial I/O * DMA Controller * FlashROM Filesystem * AICA SPU Sound Processor Driver diff --git a/addons/libkosext2fs/inode.c b/addons/libkosext2fs/inode.c index 6056e32c..a8cb184f 100644 --- a/addons/libkosext2fs/inode.c +++ b/addons/libkosext2fs/inode.c @@ -11,6 +11,7 @@ #include <stddef.h> #include <errno.h> #include <limits.h> +#include <kos/limits.h> #include <assert.h> #include <sys/queue.h> #include <inttypes.h> diff --git a/addons/libkosutils/netcfg.c b/addons/libkosutils/netcfg.c index 6ed801e5..39a78613 100644 --- a/addons/libkosutils/netcfg.c +++ b/addons/libkosutils/netcfg.c @@ -8,7 +8,9 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> +#include <unistd.h> #include <assert.h> +#include <kos/fs.h> #include <kos/netcfg.h> #include <dc/flashrom.h> #include <dc/vmu_pkg.h> diff --git a/addons/libpthread/Makefile b/addons/libpthread/Makefile new file mode 100644 index 00000000..54f2879a --- /dev/null +++ b/addons/libpthread/Makefile @@ -0,0 +1,71 @@ +# KallistiOS ##version## +# +# addons/libpthread/Makefile +# Copyright (C) 2023, 2024 Lawrence Sebald +# + +TARGET = libpthread.a +SUBDIRS = + +# Threads +OBJS = pthread_create.o pthread_self.o pthread_detach.o pthread_join.o \ + pthread_exit.o pthread_equal.o pthread_getname_np.o \ + pthread_setname_np.o + +# Thread Attributes +OBJS += pthread_attr_init.o pthread_attr_destroy.o \ + pthread_attr_setdetachstate.o pthread_attr_getdetachstate.o \ + pthread_attr_setstack.o pthread_attr_getstack.o \ + pthread_attr_setstacksize.o pthread_attr_getstacksize.o \ + pthread_attr_setschedparam.o pthread_attr_getschedparam.o \ + pthread_attr_setguardsize.o pthread_attr_getguardsize.o \ + pthread_attr_setscope.o pthread_attr_getscope.o \ + pthread_attr_setname_np.o pthread_attr_getname_np.o + +# Thread Cancellation +OBJS += pthread_cancel.o pthread_testcancel.o pthread_setcancelstate.o \ + pthread_setcanceltype.o + +# Dynamic package initialization +OBJS += pthread_once.o + +# Thread-specific data key creation/deletion and data management +OBJS += pthread_key_create.o pthread_key_delete.o pthread_getspecific.o \ + pthread_setspecific.o + +# Mutexes +OBJS += pthread_mutex_init.o pthread_mutex_destroy.o pthread_mutex_lock.o \ + pthread_mutex_trylock.o pthread_mutex_timedlock.o \ + pthread_mutex_unlock.o pthread_mutex_consistent.o \ + pthread_mutexattr_init.o pthread_mutexattr_destroy.o \ + pthread_mutexattr_settype.o pthread_mutexattr_gettype.o \ + pthread_mutexattr_setrobust.o pthread_mutexattr_getrobust.o + +# Condition Variables +OBJS += pthread_cond_init.o pthread_cond_destroy.o pthread_cond_wait.o \ + pthread_cond_timedwait.o pthread_cond_signal.o \ + pthread_cond_broadcast.o \ + pthread_condattr_init.o pthread_condattr_destroy.o \ + pthread_condattr_setclock.o pthread_condattr_getclock.o + +# Reader/Writer Locks +OBJS += pthread_rwlockattr_init.o pthread_rwlockattr_destroy.o \ + pthread_rwlock_init.o pthread_rwlock_destroy.o pthread_rwlock_rdlock.o \ + pthread_rwlock_wrlock.o pthread_rwlock_unlock.o \ + pthread_rwlock_tryrdlock.o pthread_rwlock_trywrlock.o \ + pthread_rwlock_timedrdlock.o pthread_rwlock_timedwrlock.o + +# Spin Locks +OBJS += pthread_spin_init.o pthread_spin_destroy.o pthread_spin_lock.o \ + pthread_spin_trylock.o pthread_spin_unlock.o + +# Barriers +OBJS += pthread_barrierattr_init.o pthread_barrierattr_destroy.o \ + pthread_barrier_init.o pthread_barrier_destroy.o \ + pthread_barrier_wait.o + +# Misc. +OBJS += pthread_atfork.o pthread_getsetconcurrency.o pthread_yield.o \ + pthread_setprio.o pthread_getprio.o + +include $(KOS_BASE)/addons/Makefile.prefab diff --git a/addons/libkosext2fs/kos/dreamcast.cnf b/addons/libpthread/kos/dreamcast.cnf similarity index 100% copy from addons/libkosext2fs/kos/dreamcast.cnf copy to addons/libpthread/kos/dreamcast.cnf diff --git a/addons/libpthread/pthread-internal.h b/addons/libpthread/pthread-internal.h new file mode 100644 index 00000000..9a3b3b2e --- /dev/null +++ b/addons/libpthread/pthread-internal.h @@ -0,0 +1,84 @@ +/* KallistiOS ##version## + + pthread-internal.h + Copyright (C) 2023, 2024 Lawrence Sebald +*/ ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |