diff options
author | Sverker Eriksson <[email protected]> | 2015-04-10 17:12:56 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-04-10 17:26:39 +0200 |
commit | 7f6e9ab38d14cba1386cb91307258302702617b8 (patch) | |
tree | 45c365b44ea915bc3c355f88f6368c0cf5455753 /erts/emulator/drivers | |
parent | 641003f0dd87c0f50b06c022a1d162fc04e96795 (diff) | |
download | otp-7f6e9ab38d14cba1386cb91307258302702617b8.tar.gz otp-7f6e9ab38d14cba1386cb91307258302702617b8.tar.bz2 otp-7f6e9ab38d14cba1386cb91307258302702617b8.zip |
erts: Cleanup code in invoke_pwritev
Diffstat (limited to 'erts/emulator/drivers')
-rw-r--r-- | erts/emulator/drivers/common/efile_drv.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c index 8d4992c3f0..518646649d 100644 --- a/erts/emulator/drivers/common/efile_drv.c +++ b/erts/emulator/drivers/common/efile_drv.c @@ -1616,12 +1616,12 @@ static void invoke_altname(void *data) } static void invoke_pwritev(void *data) { - struct t_data *d = (struct t_data *) data; + struct t_data* const d = (struct t_data *) data; + struct t_pwritev * const c = &d->c.pwritev; SysIOVec *iov0; SysIOVec *iov; int iovlen; int iovcnt; - struct t_pwritev *c = &d->c.pwritev; size_t p; int segment; size_t size, write_size, written; @@ -1695,9 +1695,9 @@ static void invoke_pwritev(void *data) { d->result_ok = 0; d->again = 0; deq_error: - MUTEX_LOCK(d->c.pwritev.q_mtx); - driver_deq(d->c.pwritev.port, c->size); - MUTEX_UNLOCK(d->c.pwritev.q_mtx); + MUTEX_LOCK(c->q_mtx); + driver_deq(c->port, c->size); + MUTEX_UNLOCK(c->q_mtx); goto done; } else { @@ -1708,9 +1708,9 @@ static void invoke_pwritev(void *data) { ASSERT(written >= FILE_SEGMENT_WRITE); } - MUTEX_LOCK(d->c.pwritev.q_mtx); - driver_deq(d->c.pwritev.port, written); - MUTEX_UNLOCK(d->c.pwritev.q_mtx); + MUTEX_LOCK(c->q_mtx); + driver_deq(c->port, written); + MUTEX_UNLOCK(c->q_mtx); done: EF_FREE(iov); /* Free our copy of the vector, nothing to restore */ |