Skip to content

std.os: spring-cleanup and specify organization - #14726

Closed
matu3ba wants to merge 1 commit into
ziglang:masterfrom
matu3ba:cleanup_os
Closed

std.os: spring-cleanup and specify organization#14726
matu3ba wants to merge 1 commit into
ziglang:masterfrom
matu3ba:cleanup_os

Conversation

@matu3ba

@matu3bamatu3ba commented Feb 25, 2023

Copy link
Copy Markdown
Contributor
  • Alphabetically sort things, where reasonable.
  • Document, that only non-portable posix things belong into posix.zig
    • If there is a portable abstraction, do not offer one in posix.zig
    • Reason: Prevent useless abstractions and needless strong coupling.
  • Move posix-only functions into posix.zig, which have either incompatible
    or more extensive execution semantics than their counterparts and can be
    grouped into
    • File permission system
    • Process management
    • Memory management
    • IPC
    • Signaling

Work on #6600.

@matu3ba

This comment was marked as resolved.

@matu3ba

This comment was marked as resolved.

@kassane

Copy link
Copy Markdown
Contributor

Ref: #14795

@matu3ba

Copy link
Copy Markdown
ContributorAuthor

Future TODOs

Where should linux only error abstractions go? linux.zig and move the non-error abstractions into linux/api.zig?

  • epoll_create1, epoll_ctl, epoll_wait

  • inotify_init1, inotify_add_watch, inotify_add_watchZ, inotify_rm_watch: linux

  • dl_iterate_phdr

  • sched_getaffinity

  • signalfd

  • syncfs

  • perf_event_open etc

  • timerfd_create, timerfd_gettime, timerfd_gettime (posix ones are broken)

  • maybeIgnoreSigpipe: belongs into start.zig

Comment threadlib/std/os/posix.zig Outdated
Comment threadlib/std/os/posix.zig Outdated
- Alphabetically sort things, where reasonable.
- Document, that **only** non-portable posix things belong into posix.zig
* If there is a portable abstraction, do not offer one in posix.zig
* Reason: Prevent useless abstractions and needless strong coupling.
- Move posix-only functions into posix.zig, which have either incompatible
or more extensive execution semantics than their counterparts and can be
grouped into
* File permission system
* Process management
* Memory management
* IPC
* Signaling
Work on ziglang#6600.
@andrewrk

Copy link
Copy Markdown
Member

This pull request is extremely chaotic and does a lot of things that are difficult to review, and likely to break. Let us chat about big changes to std.os ahead of time and be intentional and precise about what exactly the goal is.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@matu3ba@kassane@andrewrk