Expand OS\
design notes
#169
Replies: 6 comments 88 replies
-
Thread: How should a C type that is used like a shape be represented?
|
Beta Was this translation helpful? Give feedback.
-
Thread: How should a C type that is used like a
|
Beta Was this translation helpful? Give feedback.
-
Thread: Non-portable extensions
|
Beta Was this translation helpful? Give feedback.
-
Since the goal of |
Beta Was this translation helpful? Give feedback.
-
I just created #170 to include the conclusions from here |
Beta Was this translation helpful? Give feedback.
-
I'm splitting this out from 'How should a C type that is used like a shape be represented?' as:
I think it's special as it is extremely shape-like: it has both fields, and flags that indicate the presence of these fields. This is necessary as
|
Beta Was this translation helpful? Give feedback.
-
Current notes are here: https://github.com/hhvm/hsl/blob/main/src/os/README.md
When discussing subproccess in facebook/hhvm#8946 (cc @Atry), there's some related discussions that should be clarified here; separate threads below, but summarizing here for readability.
Language-based changes
OS\
makes changes to the functions when the functions are designed a certain way because of limitations of the C language. For example:errno
on failure, theOS\
function returnsvoid
, or throws on errorQuestions
posix_spawnattr_t
?vec<A|B|C>
be represented? For example,posix_spawn_file_actions_t
?vec<WeCreateASupertype>
withvec[foo_addA(), ...]
vec<WeCreateASupertype>
withvec[foo_OTHERVERB_a(), ...]
given that it's no longer being added to afoo_t
vec[foo_t::a(), ...]
vec[foo_t\a(), ...]
$container = foo_init(); foo_addA($a, ...); foo_addB($b, ...)
C API(new container_t())->addA(...)->addB(...)
container_t_init()->addA(...)->addB(...)
Non-portable extensions
For example, there is
posix_spawn_file_actions_addchdir_np
in BSD libc and Glibc (expected without the NP suffix in Issue 8)._np
extension...... or should we create
_np_bsd
,np_glibc
,_np_hhvm
suffixes for clarity?Beta Was this translation helpful? Give feedback.
All reactions