about summary refs log tree commit diff
path: root/library/std/src/sys/pal/xous
AgeCommit message (Collapse)AuthorLines
2024-01-13std: xous: use constants for stdout and stderrSean Cross-3/+5
Use constants for the opcodes when writing to stdout or stderr. There still is no stdin operation. Signed-off-by: Sean Cross <sean@xobs.io>
2024-01-13std: xous: mark stdio structs as `repr(C)`Sean Cross-2/+2
Ensure these structs have a well-defined ABI layout. Signed-off-by: Sean Cross <sean@xobs.io>
2024-01-13xous: net: initial commit of network supportSean Cross-1/+1364
This is an initial commit of network support for Xous. On hardware, is backed by smoltcp running via a Xous server in a separate process space. This patch adds TCP and UDP client and server support as well as DNS resolution support using the dns Xous server. Signed-off-by: Sean Cross <sean@xobs.io>
2024-01-13std: xous: share allocator symbol in testsSean Cross-0/+8
When using the testing framework, a second copy of libstd is built and linked. Use a global symbol for the `DLMALLOC` variable and mark it as `extern` when building as a test. This ensures we only have a single allocator even when running tests. Signed-off-by: Sean Cross <sean@xobs.io>
2024-01-13std: xous: fix thread_local_key under testsSean Cross-38/+63
When running tests, libstd gets implemented as a second library. Due to this fact, the `create()` and `destroy()` functions come from different libraries. To work around this, stash the `destroy_tls()` pointer in the first unused slot in the thread local storage pool. That way even if the destruction comes from a different version of libstd, the correct `DTORS` list will be consulted. Signed-off-by: Sean Cross <sean@xobs.io>
2024-01-13std: once: use queue implementation on XousSean Cross-2/+0
Use the global queue implementation of Once when running on Xous. This gets us a thread-safe implementation, rather than using the non-threadsafe `unsupported` implementation. Signed-off-by: Sean Cross <sean@xobs.io>
2024-01-13std: xous: rewrite rwlock to be more robustSean Cross-21/+23
Add more checks to RwLock on Xous. As part of this, ensure the variable is in a good state when unlocking. Additionally, use the global `yield_now()` rather than platform-specific `do_yield()`. Signed-off-by: Sean Cross <sean@xobs.io>
2024-01-13std: xous: use blocking_scalars for mutex unlockSean Cross-13/+7
Use blocking scalars when unlocking a mutex. This ensures that mutexes are unlocked immediately rather than dangling. Signed-off-by: Sean Cross <sean@xobs.io>
2024-01-13std: xous: rework condvar to fix soundness issuesSean Cross-61/+98
Rework the Condvar implementation on Xous to ensure notifications are not missed. This involves keeping track of how many times a Condvar timed out and synchronizing based on that. Signed-off-by: Sean Cross <sean@xobs.io>
2024-01-13xous: std: thread_parking: fix deadlocksbunnie-22/+40
Fix a deadlock condition that can occur when a thread is awoken in between the point at which it checks its wake state and the point where it actually waits. This change will cause the waker to continuously send Notify messages until it actually wakes up the target thread. Signed-off-by: Sean Cross <sean@xobs.io>
2024-01-11std: begin moving platform support modules into `pal`joboet-0/+1194