~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/iocache.h

  • Committer: Monty Taylor
  • Date: 2009-12-15 19:19:16 UTC
  • mto: (1241.14.1 out-of-tree)
  • mto: This revision was merged to the branch mainline in revision 1250.
  • Revision ID: mordred@inaugust.com-20091215191916-8wz3s0eojmkpzuy4
Put my_off_t back... but this time localized only to myisam and mysys.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
  pthread_cond_t        cond;            /* To wait for signals. */
37
37
  pthread_cond_t        cond_writer;     /* For a synchronized writer. */
38
38
  /* Offset in file corresponding to the first byte of buffer. */
39
 
  uint64_t              pos_in_file;
 
39
  my_off_t              pos_in_file;
40
40
  /* If a synchronized write cache is the source of the data. */
41
41
  struct st_io_cache    *source_cache;
42
42
  unsigned char                 *buffer;         /* The read buffer. */
49
49
typedef struct st_io_cache    /* Used when cacheing files */
50
50
{
51
51
  /* Offset in file corresponding to the first byte of unsigned char* buffer. */
52
 
  uint64_t pos_in_file;
 
52
  my_off_t pos_in_file;
53
53
  /*
54
54
    The offset of end of file for READ_CACHE and WRITE_CACHE.
55
55
    For SEQ_READ_APPEND it the maximum of the actual end of file and
56
56
    the position represented by read_end.
57
57
  */
58
 
  uint64_t end_of_file;
 
58
  my_off_t end_of_file;
59
59
  /* Points to current read position in the buffer */
60
60
  unsigned char  *read_pos;
61
61
  /* the non-inclusive boundary in the buffer for the currently valid read */
159
159
    used (because it's not reliable on all systems)
160
160
  */
161
161
  uint32_t inited;
162
 
  uint64_t aio_read_pos;
 
162
  my_off_t aio_read_pos;
163
163
  my_aio_result aio_result;
164
164
#endif
165
165
} IO_CACHE;
166
166
 
167
167
extern int init_io_cache(IO_CACHE *info,int file,size_t cachesize,
168
 
                         enum cache_type type,uint64_t seek_offset,
 
168
                         enum cache_type type,my_off_t seek_offset,
169
169
                         bool use_async_io, myf cache_myflags);
170
170
extern bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
171
 
                            uint64_t seek_offset,bool use_async_io,
 
171
                            my_off_t seek_offset,bool use_async_io,
172
172
                            bool clear_cache);
173
173
extern void setup_io_cache(IO_CACHE* info);
174
174
extern void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare,
178
178
extern int _my_b_async_read(IO_CACHE *info,unsigned char *Buffer,size_t Count);
179
179
 
180
180
extern int my_block_write(IO_CACHE *info, const unsigned char *Buffer,
181
 
                          size_t Count, uint64_t pos);
 
181
                          size_t Count, my_off_t pos);
182
182
extern int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock);
183
183
 
184
184
#define flush_io_cache(info) my_b_flush_io_cache((info),1)