For future use in the Linux emulation layer for the semtimedop syscall
split the sys_semop syscall into two counterparts and add
struct timespec *timeout argument to the last one.
Details
Details
- Reviewers
kib jhb - Commits
- R10:f04534f5c84e: sysvsem: Add a timeout argument to the semop.
Diff Detail
Diff Detail
- Repository
- R10 FreeBSD src repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
sys/kern/sysv_sem.c | ||
---|---|---|
1351–1352 | I think this is fine, but I would maybe write this bit instead as something like: if (error != 0) { if (error == ERESTART) error = EINTR; goto done2; } I think that makes the intent clearer overall. |
sys/kern/sysv_sem.c | ||
---|---|---|
1155 | There is very similar, if not identical code, both in your recent kern_sig.c changes, and in kern_event.c::kqueue_scan(). Can it be extracted into some common helper? Also it arguably requires a comment so that people easily see how we handle timeout precision. |