Skip to content
This repository has been archived by the owner on Nov 21, 2017. It is now read-only.

Direction flag with input/output functions #32

Open
IanSeyler opened this issue Mar 26, 2013 · 1 comment
Open

Direction flag with input/output functions #32

IanSeyler opened this issue Mar 26, 2013 · 1 comment
Assignees

Comments

@IanSeyler
Copy link
Member

Some functions will break if the direction flag is set.

Should this be left to the app programmer to verify? Or should the OS save/restore the state of the flag on all calls?

@ghost ghost assigned IanSeyler Mar 26, 2013
@Roxxik
Copy link
Contributor

Roxxik commented Jul 7, 2015

This will lead to some difficult to track down problems if the OS crashes when you have a flag set while making a syscall, while this behaviour is not documented

I'd recommend to clear the direction flag on the functions that would break and declare in the API that no assumptions about the direction flag have to be made after using said functions

or alternatively if the direction flag has a deterministic state after making a syscall we can just document it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants