16 #include <my_global.h>
19 #ifdef USE_SYSTEM_WRAPPERS
20 #include "system_wrappers.h"
24 #include <sys/resource.h>
27 #include <my_pthread.h>
29 #ifdef HAVE_PSI_INTERFACE
31 #if !defined(HAVE_PREAD) && !defined(_WIN32)
32 extern PSI_mutex_key key_my_file_info_mutex;
35 #if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
36 extern PSI_mutex_key key_LOCK_localtime_r;
39 extern PSI_mutex_key key_BITMAP_mutex, key_IO_CACHE_append_buffer_lock,
40 key_IO_CACHE_SHARE_mutex, key_KEY_CACHE_cache_lock, key_LOCK_alarm,
41 key_my_thread_var_mutex, key_THR_LOCK_charset, key_THR_LOCK_heap,
42 key_THR_LOCK_lock, key_THR_LOCK_malloc,
43 key_THR_LOCK_mutex, key_THR_LOCK_myisam, key_THR_LOCK_net,
44 key_THR_LOCK_open, key_THR_LOCK_threads,
45 key_TMPDIR_mutex, key_THR_LOCK_myisam_mmap;
47 extern PSI_cond_key key_COND_alarm, key_IO_CACHE_SHARE_cond,
48 key_IO_CACHE_SHARE_cond_writer, key_my_thread_var_suspend,
51 #ifdef USE_ALARM_THREAD
52 extern PSI_thread_key key_thread_alarm;
59 extern mysql_mutex_t THR_LOCK_malloc, THR_LOCK_open, THR_LOCK_keycache;
65 #ifdef HAVE_PSI_INTERFACE
66 #ifdef HUGETLB_USE_PROC_MEMINFO
67 extern PSI_file_key key_file_proc_meminfo;
69 extern PSI_file_key key_file_charset;
80 void my_error_unregister_all(
void);
85 extern File my_win_open(
const char *path,
int oflag);
86 extern int my_win_close(File fd);
87 extern size_t my_win_read(File fd, uchar *buffer,
size_t count);
88 extern size_t my_win_write(File fd,
const uchar *buffer,
size_t count);
89 extern size_t my_win_pread(File fd, uchar *buffer,
size_t count,
91 extern size_t my_win_pwrite(File fd,
const uchar *buffer,
size_t count,
93 extern my_off_t my_win_lseek(File fd, my_off_t pos,
int whence);
94 extern int my_win_chsize(File fd, my_off_t newlength);
95 extern FILE* my_win_fopen(
const char *filename,
const char *
type);
96 extern File my_win_fclose(FILE *
file);
97 extern File my_win_fileno(FILE *
file);
98 extern FILE* my_win_fdopen(File Filedes,
const char *
type);
99 extern int my_win_stat(
const char *path,
struct _stati64 *
buf);
100 extern int my_win_fstat(File fd,
struct _stati64 *
buf);
101 extern int my_win_fsync(File fd);
102 extern File my_win_dup(File fd);
103 extern File my_win_sopen(
const char *path,
int oflag,
int shflag,
int perm);
104 extern File my_open_osfhandle(HANDLE handle,
int oflag);