summaryrefslogtreecommitdiff
path: root/include/my_sys.h
diff options
context:
space:
mode:
authorstewart@willster.(none) <>2006-11-02 17:25:53 +1100
committerstewart@willster.(none) <>2006-11-02 17:25:53 +1100
commit8d05d3899257ad2abe16493b2ba80a956d7126c6 (patch)
treeb954b4fb0dc879d88f71702f5ca5b3ddbfb8a2a0 /include/my_sys.h
parented8a82db21c5c30f965f6c4a23f4cde02a19412f (diff)
parent0d27df6f1a7ecb37d7445922a053c14f70bb1f6e (diff)
downloadmariadb-git-8d05d3899257ad2abe16493b2ba80a956d7126c6.tar.gz
Merge willster.(none):/home/stewart/Documents/MySQL/5.1/ndb
into willster.(none):/home/stewart/Documents/MySQL/5.1/pending
Diffstat (limited to 'include/my_sys.h')
-rw-r--r--include/my_sys.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index 5b68ee609e9..f630ffbebf3 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -341,12 +341,18 @@ typedef int (*IO_CACHE_CALLBACK)(struct st_io_cache*);
#ifdef THREAD
typedef struct st_io_cache_share
{
- /* to sync on reads into buffer */
- pthread_mutex_t mutex;
- pthread_cond_t cond;
- int count, total;
- /* actual IO_CACHE that filled the buffer */
- struct st_io_cache *active;
+ pthread_mutex_t mutex; /* To sync on reads into buffer. */
+ pthread_cond_t cond; /* To wait for signals. */
+ pthread_cond_t cond_writer; /* For a synchronized writer. */
+ /* Offset in file corresponding to the first byte of buffer. */
+ my_off_t pos_in_file;
+ /* If a synchronized write cache is the source of the data. */
+ struct st_io_cache *source_cache;
+ byte *buffer; /* The read buffer. */
+ byte *read_end; /* Behind last valid byte of buffer. */
+ int running_threads; /* threads not in lock. */
+ int total_threads; /* threads sharing the cache. */
+ int error; /* Last error. */
#ifdef NOT_YET_IMPLEMENTED
/* whether the structure should be free'd */
my_bool alloced;
@@ -720,8 +726,8 @@ extern void setup_io_cache(IO_CACHE* info);
extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count);
#ifdef THREAD
extern int _my_b_read_r(IO_CACHE *info,byte *Buffer,uint Count);
-extern void init_io_cache_share(IO_CACHE *info,
- IO_CACHE_SHARE *s, uint num_threads);
+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,byte *Buffer,uint Count);