-
Notifications
You must be signed in to change notification settings - Fork 8
Futex syscall implementation #221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Futex syscall implementation #221
Conversation
Signed-off-by: Jean-Pierre Miceli <jean-pierre.miceli@heig-vd.ch>
The implementation uses lists Signed-off-by: Jean-Pierre Miceli <jean-pierre.miceli@heig-vd.ch>
Signed-off-by: Jean-Pierre Miceli <jean-pierre.miceli@heig-vd.ch>
Signed-off-by: Jean-Pierre Miceli <jean-pierre.miceli@heig-vd.ch>
Signed-off-by: Jean-Pierre Miceli <jean-pierre.miceli@heig-vd.ch>
Signed-off-by: Jean-Pierre Miceli <jean-pierre.miceli@heig-vd.ch>
clemdiep
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this seems ok. Just some small improvements
Signed-off-by: Jean-Pierre Miceli <jean-pierre.miceli@heig-vd.ch>
Signed-off-by: Jean-Pierre Miceli <jean-pierre.miceli@heig-vd.ch>
| /* no futex on futex_w */ | ||
| futex = (futex_t *) calloc(1, sizeof(futex_t)); | ||
| if (futex == NULL) | ||
| BUG(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also returned -EINVAL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is to indicate that calloc failed. Usually we put BUG().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense :-)
clemdiep
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last small fix and then all good
Signed-off-by: Jean-Pierre Miceli <jean-pierre.miceli@heig-vd.ch>
Basic
futexsyscall implementation.It does only supports
FUTEX_WAITandFUTEX_WAKEoperation.The implementation uses lists. It can be improved using hash table later.