Lines Matching refs:timeout
14 /*! Helper function for syscalls with relative timeout.
15 Converts the given relative timeout to an absolute timeout or retrieves
17 restarted. A negative value means infinite timeout.
20 syscall_restart_handle_timeout_pre(bigtime_t& timeout)
22 // If restarted, get the timeout from the restart parameters. Otherwise
23 // convert relative timeout to an absolute one.
26 timeout = *(bigtime_t*)thread->syscall_restart.parameters;
27 else if (timeout >= 0) {
28 timeout += system_time();
30 if (timeout < 0)
31 timeout = B_INFINITE_TIMEOUT;
36 /*! Helper function for syscalls with flags + timeout.
37 If necessary converts the given timeout to an absolute timeout or retrieves
42 syscall_restart_handle_timeout_pre(uint32& flags, bigtime_t& timeout)
44 // If restarted, get the timeout from the restart parameters. Otherwise
45 // convert relative timeout to an absolute one. Note that we preserve
50 timeout = *(bigtime_t*)thread->syscall_restart.parameters;
51 if (timeout > 0 && (flags & B_RELATIVE_TIMEOUT) != 0)
54 if (timeout > 0 && timeout < B_INFINITE_TIMEOUT) {
55 timeout += system_time();
57 if (timeout < 0)
58 timeout = B_INFINITE_TIMEOUT;
67 syscall_restart_handle_timeout_post(status_t error, bigtime_t timeout)
70 // interrupted -- store timeout and set flag for syscall restart
72 *(bigtime_t*)thread->syscall_restart.parameters = timeout;