Commit Graph

1864 Commits

Author SHA1 Message Date
4lDO2 ccfbdc0ae4 Run regular non-expect-based tests too. 2023-05-06 17:02:54 +02:00
4lDO2 5cd110a92b WIP: Add pthread tests. 2023-05-06 17:02:54 +02:00
4lDO2 74130f2c0e Update libc patch. 2023-05-06 17:02:54 +02:00
4lDO2 439b054486 Rustify pthread_rwlock_t. 2023-05-06 17:02:54 +02:00
4lDO2 e75381fd1a Patch libc via git recipe rather than local. 2023-05-06 17:02:54 +02:00
4lDO2 7e91f3f950 Add pthread tests. 2023-05-06 17:02:54 +02:00
4lDO2 d5781306d8 Support custom pthread stacks. 2023-05-06 17:02:54 +02:00
4lDO2 f60461cbf7 Use drop_in_place for pthread_attr_destroy. 2023-05-06 17:02:53 +02:00
4lDO2 b4600182b8 Also add SIGRTMAX. 2023-05-06 17:02:53 +02:00
4lDO2 c92ab239e3 Send RLCT_CANCEL and not SIGTERM when main exits. 2023-05-06 17:02:53 +02:00
4lDO2 79dfddf82c Switch to a boring mutex+condvar based barrier.
While the atomic version might be better, at the moment the priority is
to just to get RLCT working reliably.
2023-05-06 17:02:53 +02:00
4lDO2 4e5596698d Hack to support multiple compiler versions. 2023-05-06 17:02:53 +02:00
4lDO2 a3e1eed100 Wake all when unlocking internal mutexes.
This is because we don't yet count the number of waiting threads,
instead just flagging where or not there are any waiters.
2023-05-06 17:02:53 +02:00
4lDO2 7bcfa9cfd9 Fix Linux. 2023-05-06 17:02:53 +02:00
4lDO2 d1da867919 Make sighold unsafe. 2023-05-06 17:02:53 +02:00
4lDO2 e6df6ccfb3 Fix once and try to improve barrier. 2023-05-06 17:02:53 +02:00
4lDO2 8d9dd0df45 Improve pthread_cleanup_{push,pop}. 2023-05-06 17:02:53 +02:00
4lDO2 714e73112d Simplify Mutex implementation, for now. 2023-05-06 17:02:52 +02:00
4lDO2 fb3242badc New attempt at pthread_cleanup_{push,pop}. 2023-05-06 17:02:52 +02:00
4lDO2 dc8ee7b2f0 Adjust pthread_cond_t size. 2023-05-06 17:02:52 +02:00
4lDO2 beac24828d Use futex directly in waitval. 2023-05-06 17:02:52 +02:00
4lDO2 4faa315591 Use broadcast in Cond, for now. 2023-05-06 17:02:52 +02:00
4lDO2 492be53c2c Remove old pthreads-emb OS-specific code. 2023-05-06 17:02:52 +02:00
4lDO2 1d989d5cb6 Improve barrier.
Maybe it would be better to simply stick to a mutex and condvar, as
libstd does. Optimization is for later anyway.
2023-05-06 17:02:52 +02:00
4lDO2 4353ef33cd Fix pthread_join by not writing if retval == NULL. 2023-05-06 17:02:52 +02:00
4lDO2 14bfd2efd7 Redefine PTHREAD_BARRIER_SERIAL_THREAD. 2023-05-06 17:02:52 +02:00
4lDO2 9356098fb2 WIP: More complete pthread mutex implementation. 2023-05-06 17:02:52 +02:00
4lDO2 38f89cb4bb Improved barrier implementation. 2023-05-06 17:02:51 +02:00
4lDO2 cf34e2512e Move condvar impl to a mostly-safe module. 2023-05-06 17:02:51 +02:00
4lDO2 22ffed707f Fix embarrasing deadlock! 2023-05-06 17:02:51 +02:00
4lDO2 b455e2e374 Misc improvements, move barrier to safe module. 2023-05-06 17:02:51 +02:00
4lDO2 316203102a Implement pthread_cleanup_{push,pop}. 2023-05-06 17:02:51 +02:00
4lDO2 bd6cc20a75 Make pthread types opaque, and check against libc. 2023-05-06 17:02:51 +02:00
4lDO2 f0d8b6fd31 Specify the type in pthread initializers as well.
Otherwise it would be possible to do e.g.

`pthread_mutex_t mutex = PTHREAD_ONCE_INITIALIZER;```,
which would expand to
```pthread_mutex_t mutex = {0};```.
2023-05-06 17:02:51 +02:00
4lDO2 b9f19f4326 Get pcid to work using this pthread impl. 2023-05-06 17:02:51 +02:00
4lDO2 6a658bc33d Add needed functions for acid to link. 2023-05-06 17:02:51 +02:00
4lDO2 2593101ea7 Get it to compile 2023-05-06 17:02:50 +02:00
4lDO2 558d43082c WIP: Expand native pthreads implementation. 2023-05-06 17:02:50 +02:00
4lDO2 5b56d6305d Remove pthreads-emb, add custom sched.h 2023-05-06 17:02:50 +02:00
Jeremy Soller e09e2eb287 Merge branch 'fix_mspace_bug' into 'master'
Fix mspaces not being protected by locks.

See merge request redox-os/relibc!387
2023-05-06 13:15:56 +00:00
4lDO2 b5a620e5f1 Fix mspaces not being protected by locks. 2023-05-06 14:42:33 +02:00
Jeremy Soller 4c7d1a567b Merge branch 'termios_cfsetspeed_shortcut' into 'master'
termios adding cfsetspeed bsd extension which set both __c_ispeed/__c_ospeed fields

See merge request redox-os/relibc!385
2023-05-05 19:45:10 +00:00
David Carlier c2b00e8c6b termios adding cfsetspeed bsd extension which set both __c_ispeed/__c_ospeed fields 2023-05-05 16:56:23 +01:00
Jeremy Soller 6d6e068beb Merge branch 'rw_van_230504' into 'master'
Fix platform::errno = ... in signal.rs

See merge request redox-os/relibc!384
2023-05-05 15:30:49 +00:00
Ron Williams c105548036 Fix platform::errno = ... in signal.rs 2023-05-04 19:29:12 -07:00
Jeremy Soller 5980327865 Merge branch 'signal_impl2' into 'master'
signal add fewer more implementations

See merge request redox-os/relibc!378
2023-05-04 21:39:13 +00:00
Jeremy Soller 68b2859892 Merge branch 'setsid__impl' into 'master'
setsid implementation

See merge request redox-os/relibc!381
2023-05-04 21:38:40 +00:00
Jeremy Soller 8cba3451fd Merge branch 'cfmakeraw__impl' into 'master'
cfmakeraw implementation proposal

See merge request redox-os/relibc!382
2023-05-04 21:38:03 +00:00
Jeremy Soller 26f55b3019 Merge branch 'gitoxide-port' into 'master'
Add no-op tzset, plus required static vars

See merge request redox-os/relibc!383
2023-05-04 21:37:33 +00:00
Ron Williams efeca2f909 Add no-op tzset, plus required static vars 2023-05-04 13:12:04 -07:00