summaryrefslogtreecommitdiff
path: root/include/my_sys.h
diff options
context:
space:
mode:
authorMikael Ronstrom <mikael@dator8>2011-01-12 14:43:03 +0100
committerMikael Ronstrom <mikael@dator8>2011-01-12 14:43:03 +0100
commit21850d2903cccfd49cac18e70201ca8cf7eceebf (patch)
tree2572fe5a1f81ea6ca0b1fa3d47f468b568ff5503 /include/my_sys.h
parentcb59b06c40f0416465309604cdb1ca64e8988326 (diff)
parent003e87fef022c3d83430ca47bc5f8ea78c3353af (diff)
downloadmariadb-git-21850d2903cccfd49cac18e70201ca8cf7eceebf.tar.gz
merge
Diffstat (limited to 'include/my_sys.h')
-rw-r--r--include/my_sys.h25
1 files changed, 4 insertions, 21 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index 7ece2fede95..b5aa8696767 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -41,11 +41,7 @@ typedef struct my_aio_result {
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
#endif /* HAVE_VALGRIND */
-#ifndef THREAD
-extern int my_errno; /* Last error in mysys */
-#else
#include <my_pthread.h>
-#endif
#include <m_ctype.h> /* for CHARSET_INFO */
#include <stdarg.h>
@@ -314,7 +310,7 @@ struct st_my_file_info
int oflag; /* open flags, e.g O_APPEND */
#endif
enum file_type type;
-#if defined(THREAD) && !defined(HAVE_PREAD) && !defined(_WIN32)
+#if !defined(HAVE_PREAD) && !defined(_WIN32)
mysql_mutex_t mutex;
#endif
};
@@ -334,9 +330,7 @@ typedef struct st_my_tmpdir
DYNAMIC_ARRAY full_list;
char **list;
uint cur, max;
-#ifdef THREAD
mysql_mutex_t mutex;
-#endif
} MY_TMPDIR;
typedef struct st_dynamic_string
@@ -348,7 +342,6 @@ typedef struct st_dynamic_string
struct st_io_cache;
typedef int (*IO_CACHE_CALLBACK)(struct st_io_cache*);
-#ifdef THREAD
typedef struct st_io_cache_share
{
mysql_mutex_t mutex; /* To sync on reads into buffer. */
@@ -368,7 +361,6 @@ typedef struct st_io_cache_share
my_bool alloced;
#endif
} IO_CACHE_SHARE;
-#endif
typedef struct st_io_cache /* Used when cacheing files */
{
@@ -409,7 +401,7 @@ typedef struct st_io_cache /* Used when cacheing files */
WRITE_CACHE, and &read_pos and &read_end respectively otherwise
*/
uchar **current_pos, **current_end;
-#ifdef THREAD
+
/*
The lock is for append buffer used in SEQ_READ_APPEND cache
need mutex copying from append buffer to read buffer.
@@ -423,7 +415,7 @@ typedef struct st_io_cache /* Used when cacheing files */
READ_CACHE mode is supported.
*/
IO_CACHE_SHARE *share;
-#endif
+
/*
A caller will use my_b_read() macro to read from the cache
if the data is already in cache, it will be simply copied with
@@ -631,6 +623,7 @@ extern const char** get_global_errmsgs();
extern void wait_for_free_space(const char *filename, int errors);
extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags);
+extern FILE *my_freopen(const char *path, const char *mode, FILE *stream);
extern int my_fclose(FILE *fd,myf MyFlags);
extern File my_fileno(FILE *fd);
extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags);
@@ -657,14 +650,6 @@ extern int my_redel(const char *from, const char *to, int MyFlags);
extern int my_copystat(const char *from, const char *to, int MyFlags);
extern char * my_filename(File fd);
-#ifndef THREAD
-extern void dont_break(void);
-extern void allow_break(void);
-#else
-#define dont_break()
-#define allow_break()
-#endif
-
#ifdef EXTRA_DEBUG
void my_print_open_files(void);
#else
@@ -737,12 +722,10 @@ extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
pbool clear_cache);
extern void setup_io_cache(IO_CACHE* info);
extern int _my_b_read(IO_CACHE *info,uchar *Buffer,size_t Count);
-#ifdef THREAD
extern int _my_b_read_r(IO_CACHE *info,uchar *Buffer,size_t Count);
extern void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare,
IO_CACHE *write_cache, uint num_threads);
extern void remove_io_thread(IO_CACHE *info);
-#endif
extern int _my_b_seq_read(IO_CACHE *info,uchar *Buffer,size_t Count);
extern int _my_b_net_read(IO_CACHE *info,uchar *Buffer,size_t Count);
extern int _my_b_get(IO_CACHE *info);