The world's most popular open source database
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| class | mapped_files |
| class | mapped_file |
Functions | |
| mapped_files * | map_file (const my_string name, byte *magic, uint magic_length) |
| void | unmap_file (mapped_files *map) |
| mapped_files* map_file | ( | const my_string | name, | |
| byte * | magic, | |||
| uint | magic_length | |||
| ) |
Definition at line 86 of file sql_map.cc.
References current_thd, ER_NO_FILE_MAPPING, FN_REFLEN, list(), LOCK_mapped_file, map, maps_in_use, my_error(), MYF, mysql_data_home, NULL, path, pthread_mutex_lock, pthread_mutex_unlock, strcmp(), unpack_filename(), and VOID.
Referenced by mapped_file::mapped_file().
00087 { 00088 #ifdef HAVE_MMAP 00089 VOID(pthread_mutex_lock(&LOCK_mapped_file)); 00090 I_List_iterator<mapped_files> list(maps_in_use); 00091 mapped_files *map; 00092 char path[FN_REFLEN]; 00093 sprintf(path,"%s/%s/%s.uniq",mysql_data_home,current_thd->db,name); 00094 (void) unpack_filename(path,path); 00095 00096 while ((map=list++)) 00097 { 00098 if (!strcmp(path,map->name)) 00099 break; 00100 } 00101 if (!map) 00102 { 00103 map=new mapped_files(path,magic,magic_length); 00104 maps_in_use.append(map); 00105 } 00106 else 00107 { 00108 map->use_count++; 00109 if (!map->map) 00110 my_error(ER_NO_FILE_MAPPING, MYF(0), path, map->error); 00111 } 00112 VOID(pthread_mutex_unlock(&LOCK_mapped_file)); 00113 return map; 00114 #else 00115 return NULL; 00116 #endif 00117 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void unmap_file | ( | mapped_files * | map | ) |
Definition at line 123 of file sql_map.cc.
References LOCK_mapped_file, map, pthread_mutex_lock, pthread_mutex_unlock, and VOID.
Referenced by mapped_file::~mapped_file().
00124 { 00125 #ifdef HAVE_MMAP 00126 VOID(pthread_mutex_lock(&LOCK_mapped_file)); 00127 if (!map->use_count--) 00128 delete map; 00129 VOID(pthread_mutex_unlock(&LOCK_mapped_file)); 00130 #endif 00131 }
Here is the caller graph for this function:

1.4.7

