rdos wrote:Well-written applications don't break because some other application deleted a file, or whatever, and don't need error code processing to handle this. If two applications uses the same files, they must somehow synchronize their access, otherwise chaos will prevail, regardless if error codes are returned or not.
In the general case an application has no idea what other application might run in parallel, and/or if other applications might access the same files. (It might even be - *gasp* - the
user accessing the file, and it's hard synchronizing an application with
that noteable automatically.)
The general mechanics for "synchronization" is to attempt the access, and handle potential failures. It is
impossible to check all potential failures beforehand
and still be certain the assertions hold true by the time you actually do the access. (Unless you disable task switching across multiple syscalls. You wouldn't want to do that.)
You've been told this by
several people now,
several times over, in different words, but you blithely go on ignoring it, jumping up and down and chanting "but it works in RDOS, but it works in RDOS".
We heard. We understood. We don't care (much).
For the general case - and that is how this thread was started - "OS APIs without error codes" are not much of an option, for repeatedly reiterated reasons.
rdos wrote:Also, RDOS does provide reentrant syscalls for everything, including FS access.
You're such a character, dude.