Hacker News new | ask | show | jobs
by FartyMcFarter 2771 days ago
> Wouldn't it be better for the awake syscall to take another syscall as a parameter (pretty simple to do in assembly and should be provided as a C library wrapper), in order to guarantee atomicity?

Plus in this case the awake call could be named something more intuitive (like syscall_with_timeout or whatever).

1 comments

> Plus in this case the awake call could be named something more intuitive

This is an interesting objection.

I find awake/awakened/forgivewkp intuitive names, but I'm not a native English speaker.

I'm not going to add the syscall parameter (I considered and discarded that option during the analysis), but I welcome suggestions for a better naming.

Awake in itself is intuitive in some contexts, but it doesn't seem to describe the semantics you want in this case. First of all it's not obvious that it's related to syscalls. Secondly it doesn't really mean the process is guaranteed to awake after the specified time - if the syscall doesn't block or finishes faster, the process might well stay sleeping at the alleged awaking time. Someone who doesn't know all the details will easily get the wrong idea.