You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0.7.0 --- openkal 0.10's five operations, four implemented and one refused (#16)
* 0.7.0 --- openkal 0.10's five operations, four implemented and one refused
⭐⭐ THE ONE THAT IS REFUSED IS THE POINT OF THIS COMMIT.
`kal_process_spawn_bound' asks that a started program not outlive its caller,
however the caller ends --- including when it is killed outright. This system has
no primitive that arms that from inside the started image; the other kernel does,
in one call.
⚠️ WHAT THIS SYSTEM HAS INSTEAD IS A WATCH, AND A WATCH IS NOT THAT. A context
here can be told when another ends and can then act --- but a watch needs a live
context to notice, so a caller that is killed outright notices nothing and the
started program survives. That is precisely the failure the operation exists to
remove, so composing it would move the defect from "refused" to "works except
when it matters". `KAL_PROCESS_PROP_BOUND_LIFETIME' is not claimed and the
operation reports kal_err_not_supported, which a caller can ask about first.
--- the four that are implemented ------------------------------------------
⚠️ AND TWO OF THEM WOULD HAVE COMPILED, RUN, AND DONE THE WRONG THING IF COPIED
FROM THE SIBLING IMPLEMENTATION.
`struct flock' here puts the POSITIONS first and the kinds last; the other
kernel's puts the kinds first. A structure copied across would place a 64-bit
offset where two shorts belong.
And the kinds themselves are the BSD numbering: a read lock is 1 here and 0
there, a write lock is 3 here and 1 there. A table copied across would take the
wrong KIND of lock and report success.
`kal_fs_lock'/`kal_fs_unlock' use the open-file form (`F_OFD_*', 10.10 onward),
because openkal states the holder as the `kal_file' and this system's oldest form
holds it by the process --- releasing every lock when any descriptor for the node
closes.
`kal_fs_set_modified_at' opens the name for READING and uses this system's
descriptor-taking call. Opening for reading is enough for it and is what lets a
DIRECTORY be reached, which is the whole reason the declaration exists.
`kal_fs_capacity' reports bytes from `f_bavail' rather than `f_bfree' --- what
this program could use, not what the volume has.
`kal_task_parallelism' asks `hw.ncpu'; zero is "cannot say" and is not one.
* A range another holder has is reported as one value, not either of two
⚠️⚠️ THE STANDARD THIS CALL COMES FROM NAMES TWO VALUES FOR ONE CONDITION AND
LEAVES THE CHOICE TO THE SYSTEM. openkal names one.
For a lock attempt that does not wait, a range another holder has is reported as
EITHER of two errors --- the system decides. So a program written against the
standard accepts both, and an implementation of openkal must NOT pass that choice
on: `kal_err_again' is the answer a caller polls upon, and the other value
translates to `kal_err_permission', which a caller reads as "asking again will
not help" and acts upon by stopping.
⭐ NARROWED TO THE ATTEMPT THAT DOES NOT WAIT, because that is the only path for
which the two values carry this meaning. A permission failure anywhere else keeps
its own answer.
⚠️ Found by looking rather than by failing: this kernel answers the first value
in practice, so the observation passes here either way. The sibling
implementation is on a system whose lineage answers the other one, and the two
implementations must not disagree about what a caller sees.
Copy file name to clipboardExpand all lines: mcpp.toml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
[package]
2
2
namespace = "mcpplibs"
3
3
name = "openkal-macos"
4
-
version = "0.6.1"
4
+
version = "0.7.0"
5
5
description = "An implementation of openkal for macOS, written on the kernel's own calls. Its purpose is as much to test the specification as to be used."
0 commit comments