-
-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core:os
tracking issue
#4710
Comments
Virtual File System, working similarly to allocators, in that you call it with a Mode, instead of having to have vtable with all of |
Pretty sure I messed up files a little bit. I (or someone else) will have to rewrite the documentation at some point for files. |
I put it on the list under "non blocking but can have api consequences" |
I have a private branch that has a chunk of what's outlined here already done (for os->os2 conversion), including a test suite. It's been a while since I touched it (~2 months), so I'll have to revisit what's changed since. The main blocker for me was rewriting @jasonKercher's heap allocator to be thread-safe, which took quite some time, debugging, research, and learning of new skills. I'm aiming to get a draft PR of the new allocator up in a couple days. I'll need some help with testing and reviewing non-Linux system calls with regards to virtual memory, in particular. I'm currently working through integrating it into EDIT: To be perfectly clear, when I say draft PR, I mean that the allocator is largely finished from a design and implementation standpoint, but it's untested outside of microbenchmarks, my test bench, and the Odin |
Sounds great @Feoramund , excited to see it! |
Me too, and I'm very sorry ;] |
Some things I've noted when looking at
|
I added 1, 3 and 4 to the list, 2 was already there |
The heap allocator PR is up at #4749 |
We are nearing the replacement of
core:os
, this issue outlines todos and nice to haves.Todos:
env_posix.odin
has a bunch ofNOTE(laytan):
comments outlining potential improvements, same thing on the directory iterator, these comments are mostly about surfacing errors instead of ignoring them or returning just a boolean (which core:os famously does a lot and we should avoid)IMPORTANT NOTE
saying the package is a mockup needs to be removed fromdoc.odin
write
on linux needs to loop until everything is written, just like windows and posix implementations (os/os2: bring Linux to other impls standards by looping writes and maxing one shot RW sizes #4730)MAX_RW
thing other implementations do but afaik it does have the same restriction (os/os2: bring Linux to other impls standards by looping writes and maxing one shot RW sizes #4730)remove
on posix needs to handle directories, just like the other implementations (it already did, whoops)File_Flag
cases should be removed,.Sparse
,.Unbuffered_IO
core:path
needs to be looked over and possibly removed/merged into os2Targets supported in
core:os
but not yet incore:os/os2
:os.write
is implemented, maybe it should just be dropped entirely for os2Non blocking but can have api consequences:
Packages that use
core:os
and need to be updated:core:compress/gzip
core:crypto
core:encoding/csv
core:encoding/hxa
core:encoding/ini
core:encoding/xml
core:flags
core:fmt
(JS impl needs rewrite to not usecore:os
at all)core:image/bmp
core:image/netpbm
core:image/png
core:image/qoi
core:image/tga
core:image
core:log
core:math/big
core:mem/virtual
core:net
core:odin/parser
core:path/filepath
core:prof/spall
core:testing
core:text/i18n
core:text/regex
core:text/table
core:time/timezone
core:unicode/tools
tests/core/encoding/hxa
tests/core/flags
tests/core/io
tests/documentation
vendor:fontstash
vendor:libc
vendor:opengl
odin-lang/examples repo needs to be updated
Nice to have, but not blocking the replacement of
core:os
:dir.odin
,file.odin
, etc. don't have any docs_process_info_by_pid
,_process_list
,_process_open
,_process_handle_still_valid
,_process_state_update_times
for full process API coverage (decided to make non blocking because it is a new API)current_executable_path(allocator: runtime.Allocator) -> (string, Error)
returning the full absolute executable path of the program, useful for loading things relative to this path. You can already do this in a round about way with:current_process_info({.Executable_Path}, context.allocator)
but a more direct way with the native APIs for each target would be nice (os/os2: add get_executable_path and get_executable_directory #4733)base:
though, so it can be the default allocator in general (Add native lock-free dynamic heap allocator #4749)core:testing
to replaceos2.stdout
andos2.stderr
with an implementation that synchronises between tests (currently writing to stdout or stderr in tests doesn't work well because the terminal renders progress and clears it out)After replacement the following can be closed:
core:os
packageread_entire_file_xxx
procedures don't work on/proc
filesystem even if on a Linux system #4264The text was updated successfully, but these errors were encountered: