diff options
author | John Polstra <jdp@FreeBSD.org> | 2004-06-14 18:19:05 +0000 |
---|---|---|
committer | John Polstra <jdp@FreeBSD.org> | 2004-06-14 18:19:05 +0000 |
commit | 4717d22a7c97938d0e99d91f8dd1d55eeaae0fcd (patch) | |
tree | f18a0b115d49023a3e78c267aa48ca58dc6304d5 /sys/dev/ips | |
parent | c0b99ffa021c0be74d6ab90a6eccfe511be8bb19 (diff) | |
download | src-4717d22a7c97938d0e99d91f8dd1d55eeaae0fcd.tar.gz src-4717d22a7c97938d0e99d91f8dd1d55eeaae0fcd.zip |
Change the return value of sema_timedwait() so it returns 0 on
success and a proper errno value on failure. This makes it
consistent with cv_timedwait(), and paves the way for the
introduction of functions such as sema_timedwait_sig() which can
fail in multiple ways.
Bump __FreeBSD_version and add a note to UPDATING.
Approved by: scottl (ips driver), arch
Notes
Notes:
svn path=/head/; revision=130481
Diffstat (limited to 'sys/dev/ips')
-rw-r--r-- | sys/dev/ips/ips_commands.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ips/ips_commands.c b/sys/dev/ips/ips_commands.c index d9bc5b743a7a..e2495aba0ec3 100644 --- a/sys/dev/ips/ips_commands.c +++ b/sys/dev/ips/ips_commands.c @@ -248,7 +248,7 @@ static int ips_send_adapter_info_cmd(ips_command_t *command) ips_adapter_info_callback, command, BUS_DMA_NOWAIT); if ((status->value == IPS_ERROR_STATUS) || - (sema_timedwait(&command->cmd_sema, 30*hz) == 0)) + (sema_timedwait(&command->cmd_sema, 30*hz) != 0)) error = ETIMEDOUT; if (error == 0) { @@ -352,7 +352,7 @@ static int ips_send_drive_info_cmd(ips_command_t *command) command->data_buffer,IPS_DRIVE_INFO_LEN, ips_drive_info_callback, command, BUS_DMA_NOWAIT); if ((status->value == IPS_ERROR_STATUS) || - (sema_timedwait(&command->cmd_sema, 10*hz) == 0)) + (sema_timedwait(&command->cmd_sema, 10*hz) != 0)) error = ETIMEDOUT; if (error == 0) { @@ -606,7 +606,7 @@ static int ips_read_nvram(ips_command_t *command){ command->data_buffer,IPS_NVRAM_PAGE_SIZE, ips_read_nvram_callback, command, BUS_DMA_NOWAIT); if ((status->value == IPS_ERROR_STATUS) || - (sema_timedwait(&command->cmd_sema, 30*hz) == 0)) + (sema_timedwait(&command->cmd_sema, 30*hz) != 0)) error = ETIMEDOUT; if (error == 0) { |