diff options
author | bjh <bjh@13f79535-47bb-0310-9956-ffa450edef68> | 2001-12-30 14:30:58 +0000 |
---|---|---|
committer | bjh <bjh@13f79535-47bb-0310-9956-ffa450edef68> | 2001-12-30 14:30:58 +0000 |
commit | 5cd59bd4d5502c841ae0a0f5d520481c64d6f1bf (patch) | |
tree | b65e5bcfa752a8801687576d240a7103ab253518 /file_io/os2/readwrite.c | |
parent | 4f9f87c87fa9ec66b2574f14fa454099e6e0f17f (diff) | |
download | libapr-5cd59bd4d5502c841ae0a0f5d520481c64d6f1bf.tar.gz |
OS/2: switch buffered file I/O over to using apr_thread_mutex_t instead of
apr_lock_t.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62685 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/os2/readwrite.c')
-rw-r--r-- | file_io/os2/readwrite.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/file_io/os2/readwrite.c b/file_io/os2/readwrite.c index d2cea2e8f..8f521a4fe 100644 --- a/file_io/os2/readwrite.c +++ b/file_io/os2/readwrite.c @@ -77,7 +77,7 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size ULONG blocksize; ULONG size = *nbytes; - apr_lock_acquire(thefile->mutex); + apr_thread_mutex_lock(thefile->mutex); if (thefile->direction == 1) { apr_file_flush(thefile); @@ -111,7 +111,7 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size } *nbytes = rc == 0 ? pos - (char *)buf : 0; - apr_lock_release(thefile->mutex); + apr_thread_mutex_unlock(thefile->mutex); if (*nbytes == 0 && rc == 0) { return APR_EOF; @@ -164,7 +164,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a int blocksize; int size = *nbytes; - apr_lock_acquire(thefile->mutex); + apr_thread_mutex_lock(thefile->mutex); if ( thefile->direction == 0 ) { // Position file pointer for writing at the offset we are logically reading from @@ -186,7 +186,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a size -= blocksize; } - apr_lock_release(thefile->mutex); + apr_thread_mutex_unlock(thefile->mutex); return APR_OS2_STATUS(rc); } else { if (thefile->flags & APR_APPEND) { |