diff options
author | jdp <jdp@FreeBSD.org> | 2004-06-14 18:19:05 +0000 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 2004-06-14 18:19:05 +0000 |
commit | 32b926e0fbaacbc2b3175a2d2b1c791fbeefa99c (patch) | |
tree | f18a0b115d49023a3e78c267aa48ca58dc6304d5 /sys/dev/ips/ips_commands.c | |
parent | f2c0db1521299639d6b16b7d477a777fbd81ada6 (diff) | |
download | FreeBSD-src-32b926e0fbaacbc2b3175a2d2b1c791fbeefa99c.zip FreeBSD-src-32b926e0fbaacbc2b3175a2d2b1c791fbeefa99c.tar.gz |
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
Diffstat (limited to 'sys/dev/ips/ips_commands.c')
-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 d9bc5b7..e2495ab 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) { |