diff options
author | Marc Alff <marc.alff@sun.com> | 2009-12-09 20:19:51 -0700 |
---|---|---|
committer | Marc Alff <marc.alff@sun.com> | 2009-12-09 20:19:51 -0700 |
commit | c082955f0676efe069f30384102ba7807b49dee6 (patch) | |
tree | cc0a038191d1969182d5dd108c891ee10a436cc0 /mysys/my_pread.c | |
parent | 6fd3866c6c104f8bc991d71583e627ae6fabe0ab (diff) | |
download | mariadb-git-c082955f0676efe069f30384102ba7807b49dee6.tar.gz |
WL#2360 Performance schema
Part III: mysys instrumentation
Diffstat (limited to 'mysys/my_pread.c')
-rw-r--r-- | mysys/my_pread.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mysys/my_pread.c b/mysys/my_pread.c index eaabcb1b728..d0a0ddaec66 100644 --- a/mysys/my_pread.c +++ b/mysys/my_pread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (C) 2000 MySQL AB, 2008-2009 Sun Microsystems, Inc This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -60,12 +60,12 @@ size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset, { errno= 0; /* Linux, Windows don't reset this on EOF/success */ #if !defined (HAVE_PREAD) && !defined (_WIN32) - pthread_mutex_lock(&my_file_info[Filedes].mutex); + mysql_mutex_lock(&my_file_info[Filedes].mutex); readbytes= (uint) -1; error= (lseek(Filedes, offset, MY_SEEK_SET) == (my_off_t) -1 || (readbytes= read(Filedes, Buffer, Count)) != Count); save_errno= errno; - pthread_mutex_unlock(&my_file_info[Filedes].mutex); + mysql_mutex_unlock(&my_file_info[Filedes].mutex); if (error) errno= save_errno; #else @@ -150,10 +150,10 @@ size_t my_pwrite(File Filedes, const uchar *Buffer, size_t Count, #if !defined (HAVE_PREAD) && !defined (_WIN32) int error; writtenbytes= (size_t) -1; - pthread_mutex_lock(&my_file_info[Filedes].mutex); + mysql_mutex_lock(&my_file_info[Filedes].mutex); error= (lseek(Filedes, offset, MY_SEEK_SET) != (my_off_t) -1 && (writtenbytes= write(Filedes, Buffer, Count)) == Count); - pthread_mutex_unlock(&my_file_info[Filedes].mutex); + mysql_mutex_unlock(&my_file_info[Filedes].mutex); if (error) break; #elif defined (_WIN32) |