summaryrefslogtreecommitdiff
path: root/src/os/unix
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix')
-rw-r--r--src/os/unix/ngx_linux_sendfile_chain.c4
-rw-r--r--src/os/unix/ngx_sunpro_atomic_sparc64.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/os/unix/ngx_linux_sendfile_chain.c b/src/os/unix/ngx_linux_sendfile_chain.c
index eb15c7a5f..ab2a3cf1b 100644
--- a/src/os/unix/ngx_linux_sendfile_chain.c
+++ b/src/os/unix/ngx_linux_sendfile_chain.c
@@ -254,6 +254,10 @@ ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
#else
offset = (int32_t) file->file_pos;
#endif
+
+ ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
+ "sendfile: @%O %uz", file->file_pos, file_size);
+
rc = sendfile(c->fd, file->file->fd, &offset, file_size);
if (rc == -1) {
diff --git a/src/os/unix/ngx_sunpro_atomic_sparc64.h b/src/os/unix/ngx_sunpro_atomic_sparc64.h
index db852114b..b12603009 100644
--- a/src/os/unix/ngx_sunpro_atomic_sparc64.h
+++ b/src/os/unix/ngx_sunpro_atomic_sparc64.h
@@ -24,7 +24,7 @@ static ngx_inline ngx_atomic_uint_t
ngx_atomic_cmp_set(ngx_atomic_t *lock, ngx_atomic_uint_t old,
ngx_atomic_uint_t set)
{
- NGX_CASA(set, old, lock);
+ set = NGX_CASA(set, old, lock);
return (set == old);
}
@@ -41,7 +41,7 @@ ngx_atomic_fetch_add(ngx_atomic_t *value, ngx_atomic_int_t add)
res = old + add;
- NGX_CASA(res, old, value);
+ res = NGX_CASA(res, old, value);
if (res == old) {
return res;