~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/iocache.h

  • Committer: Brian Aker
  • Date: 2010-11-06 19:38:41 UTC
  • mto: This revision was merged to the branch mainline in revision 1910.
  • Revision ID: brian@tangent.org-20101106193841-exc9cc3qc515zhev
Encapsulation of IO_CACHE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
 
176
176
  ~st_io_cache()
177
177
  { }
 
178
 
 
179
  void close_cached_file();
 
180
  bool real_open_cached_file();
 
181
  int end_io_cache();
 
182
  int init_io_cache(int file, size_t cachesize,
 
183
                    enum cache_type type, my_off_t seek_offset,
 
184
                    bool use_async_io, myf cache_myflags);
 
185
  void init_functions();
 
186
 
 
187
  bool reinit_io_cache(enum cache_type type_arg,
 
188
                       my_off_t seek_offset,
 
189
                       bool use_async_io,
 
190
                       bool clear_cache);
 
191
  void setup_io_cache();
178
192
};
179
193
 
180
194
typedef struct st_io_cache IO_CACHE;    /* Used when cacheing files */
181
195
 
182
 
extern int init_io_cache(IO_CACHE *info,int file,size_t cachesize,
183
 
                         enum cache_type type,my_off_t seek_offset,
184
 
                         bool use_async_io, myf cache_myflags);
185
 
extern bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
186
 
                            my_off_t seek_offset,bool use_async_io,
187
 
                            bool clear_cache);
188
 
extern void setup_io_cache(IO_CACHE* info);
189
 
extern int _my_b_get(IO_CACHE *info);
190
 
extern int _my_b_async_read(IO_CACHE *info,unsigned char *Buffer,size_t Count);
 
196
extern int _my_b_get(st_io_cache *info);
 
197
extern int _my_b_async_read(st_io_cache *info,unsigned char *Buffer,size_t Count);
191
198
 
192
 
extern int my_block_write(IO_CACHE *info, const unsigned char *Buffer,
 
199
extern int my_block_write(st_io_cache *info, const unsigned char *Buffer,
193
200
                          size_t Count, my_off_t pos);
194
 
extern int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock);
 
201
extern int my_b_flush_io_cache(st_io_cache *info, int need_append_buffer_lock);
195
202
 
196
203
#define flush_io_cache(info) my_b_flush_io_cache((info),1)
197
204
 
198
 
extern int end_io_cache(IO_CACHE *info);
199
 
extern bool open_cached_file(IO_CACHE *cache,const char *dir,
 
205
extern bool open_cached_file(st_io_cache *cache,const char *dir,
200
206
                             const char *prefix, size_t cache_size,
201
207
                             myf cache_myflags);
202
 
extern bool real_open_cached_file(IO_CACHE *cache);
203
 
extern void close_cached_file(IO_CACHE *cache);
204
208
 
205
209
} /* namespace internal */
206
210
} /* namespace drizzled */